@kousaku-maron/diffshape 0.4.0 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin/{chunk-EAWLY4IY.js → chunk-AKBOSCJ7.js} +38 -7
- package/dist/bin/dbshape.js +1 -1
- package/dist/bin/depshape.js +1 -1
- package/dist/bin/diffshape.js +1 -1
- package/dist/bin/fileshape.js +1 -1
- package/dist/bin/ui/assets/index-Drh5gF_A.js +153 -0
- package/dist/bin/ui/assets/{index-8ie1NCfx.css → index-pEETZtFR.css} +1 -1
- package/dist/bin/ui/index.html +2 -2
- package/package.json +4 -4
- package/dist/bin/ui/assets/index-CnRZHirE.js +0 -152
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const s of o.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}})();var af=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Qh(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Zh={exports:{}},bl={},Jh={exports:{}},Se={};/**
|
|
2
|
+
* @license React
|
|
3
|
+
* react.production.min.js
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
6
|
+
*
|
|
7
|
+
* This source code is licensed under the MIT license found in the
|
|
8
|
+
* LICENSE file in the root directory of this source tree.
|
|
9
|
+
*/var Oo=Symbol.for("react.element"),Tv=Symbol.for("react.portal"),$v=Symbol.for("react.fragment"),Iv=Symbol.for("react.strict_mode"),Lv=Symbol.for("react.profiler"),Av=Symbol.for("react.provider"),Ov=Symbol.for("react.context"),Rv=Symbol.for("react.forward_ref"),Mv=Symbol.for("react.suspense"),Pv=Symbol.for("react.memo"),Fv=Symbol.for("react.lazy"),uf=Symbol.iterator;function Dv(e){return e===null||typeof e!="object"?null:(e=uf&&e[uf]||e["@@iterator"],typeof e=="function"?e:null)}var em={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},tm=Object.assign,nm={};function Ci(e,t,n){this.props=e,this.context=t,this.refs=nm,this.updater=n||em}Ci.prototype.isReactComponent={};Ci.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Ci.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function rm(){}rm.prototype=Ci.prototype;function jc(e,t,n){this.props=e,this.context=t,this.refs=nm,this.updater=n||em}var _c=jc.prototype=new rm;_c.constructor=jc;tm(_c,Ci.prototype);_c.isPureReactComponent=!0;var cf=Array.isArray,im=Object.prototype.hasOwnProperty,Tc={current:null},om={key:!0,ref:!0,__self:!0,__source:!0};function sm(e,t,n){var r,i={},o=null,s=null;if(t!=null)for(r in t.ref!==void 0&&(s=t.ref),t.key!==void 0&&(o=""+t.key),t)im.call(t,r)&&!om.hasOwnProperty(r)&&(i[r]=t[r]);var l=arguments.length-2;if(l===1)i.children=n;else if(1<l){for(var a=Array(l),u=0;u<l;u++)a[u]=arguments[u+2];i.children=a}if(e&&e.defaultProps)for(r in l=e.defaultProps,l)i[r]===void 0&&(i[r]=l[r]);return{$$typeof:Oo,type:e,key:o,ref:s,props:i,_owner:Tc.current}}function zv(e,t){return{$$typeof:Oo,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function $c(e){return typeof e=="object"&&e!==null&&e.$$typeof===Oo}function Bv(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var df=/\/+/g;function Zl(e,t){return typeof e=="object"&&e!==null&&e.key!=null?Bv(""+e.key):t.toString(36)}function ws(e,t,n,r,i){var o=typeof e;(o==="undefined"||o==="boolean")&&(e=null);var s=!1;if(e===null)s=!0;else switch(o){case"string":case"number":s=!0;break;case"object":switch(e.$$typeof){case Oo:case Tv:s=!0}}if(s)return s=e,i=i(s),e=r===""?"."+Zl(s,0):r,cf(i)?(n="",e!=null&&(n=e.replace(df,"$&/")+"/"),ws(i,t,n,"",function(u){return u})):i!=null&&($c(i)&&(i=zv(i,n+(!i.key||s&&s.key===i.key?"":(""+i.key).replace(df,"$&/")+"/")+e)),t.push(i)),1;if(s=0,r=r===""?".":r+":",cf(e))for(var l=0;l<e.length;l++){o=e[l];var a=r+Zl(o,l);s+=ws(o,t,n,a,i)}else if(a=Dv(e),typeof a=="function")for(e=a.call(e),l=0;!(o=e.next()).done;)o=o.value,a=r+Zl(o,l++),s+=ws(o,t,n,a,i);else if(o==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return s}function Go(e,t,n){if(e==null)return e;var r=[],i=0;return ws(e,r,"","",function(o){return t.call(n,o,i++)}),r}function Uv(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var St={current:null},ks={transition:null},Hv={ReactCurrentDispatcher:St,ReactCurrentBatchConfig:ks,ReactCurrentOwner:Tc};function lm(){throw Error("act(...) is not supported in production builds of React.")}Se.Children={map:Go,forEach:function(e,t,n){Go(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return Go(e,function(){t++}),t},toArray:function(e){return Go(e,function(t){return t})||[]},only:function(e){if(!$c(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};Se.Component=Ci;Se.Fragment=$v;Se.Profiler=Lv;Se.PureComponent=jc;Se.StrictMode=Iv;Se.Suspense=Mv;Se.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Hv;Se.act=lm;Se.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=tm({},e.props),i=e.key,o=e.ref,s=e._owner;if(t!=null){if(t.ref!==void 0&&(o=t.ref,s=Tc.current),t.key!==void 0&&(i=""+t.key),e.type&&e.type.defaultProps)var l=e.type.defaultProps;for(a in t)im.call(t,a)&&!om.hasOwnProperty(a)&&(r[a]=t[a]===void 0&&l!==void 0?l[a]:t[a])}var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){l=Array(a);for(var u=0;u<a;u++)l[u]=arguments[u+2];r.children=l}return{$$typeof:Oo,type:e.type,key:i,ref:o,props:r,_owner:s}};Se.createContext=function(e){return e={$$typeof:Ov,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:Av,_context:e},e.Consumer=e};Se.createElement=sm;Se.createFactory=function(e){var t=sm.bind(null,e);return t.type=e,t};Se.createRef=function(){return{current:null}};Se.forwardRef=function(e){return{$$typeof:Rv,render:e}};Se.isValidElement=$c;Se.lazy=function(e){return{$$typeof:Fv,_payload:{_status:-1,_result:e},_init:Uv}};Se.memo=function(e,t){return{$$typeof:Pv,type:e,compare:t===void 0?null:t}};Se.startTransition=function(e){var t=ks.transition;ks.transition={};try{e()}finally{ks.transition=t}};Se.unstable_act=lm;Se.useCallback=function(e,t){return St.current.useCallback(e,t)};Se.useContext=function(e){return St.current.useContext(e)};Se.useDebugValue=function(){};Se.useDeferredValue=function(e){return St.current.useDeferredValue(e)};Se.useEffect=function(e,t){return St.current.useEffect(e,t)};Se.useId=function(){return St.current.useId()};Se.useImperativeHandle=function(e,t,n){return St.current.useImperativeHandle(e,t,n)};Se.useInsertionEffect=function(e,t){return St.current.useInsertionEffect(e,t)};Se.useLayoutEffect=function(e,t){return St.current.useLayoutEffect(e,t)};Se.useMemo=function(e,t){return St.current.useMemo(e,t)};Se.useReducer=function(e,t,n){return St.current.useReducer(e,t,n)};Se.useRef=function(e){return St.current.useRef(e)};Se.useState=function(e){return St.current.useState(e)};Se.useSyncExternalStore=function(e,t,n){return St.current.useSyncExternalStore(e,t,n)};Se.useTransition=function(){return St.current.useTransition()};Se.version="18.3.1";Jh.exports=Se;var U=Jh.exports;/**
|
|
10
|
+
* @license React
|
|
11
|
+
* react-jsx-runtime.production.min.js
|
|
12
|
+
*
|
|
13
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
14
|
+
*
|
|
15
|
+
* This source code is licensed under the MIT license found in the
|
|
16
|
+
* LICENSE file in the root directory of this source tree.
|
|
17
|
+
*/var Wv=U,Vv=Symbol.for("react.element"),Gv=Symbol.for("react.fragment"),Kv=Object.prototype.hasOwnProperty,qv=Wv.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,Yv={key:!0,ref:!0,__self:!0,__source:!0};function am(e,t,n){var r,i={},o=null,s=null;n!==void 0&&(o=""+n),t.key!==void 0&&(o=""+t.key),t.ref!==void 0&&(s=t.ref);for(r in t)Kv.call(t,r)&&!Yv.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)i[r]===void 0&&(i[r]=t[r]);return{$$typeof:Vv,type:e,key:o,ref:s,props:i,_owner:qv.current}}bl.Fragment=Gv;bl.jsx=am;bl.jsxs=am;Zh.exports=bl;var f=Zh.exports,um={exports:{}},Wt={},cm={exports:{}},dm={};/**
|
|
18
|
+
* @license React
|
|
19
|
+
* scheduler.production.min.js
|
|
20
|
+
*
|
|
21
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
22
|
+
*
|
|
23
|
+
* This source code is licensed under the MIT license found in the
|
|
24
|
+
* LICENSE file in the root directory of this source tree.
|
|
25
|
+
*/(function(e){function t(M,K){var S=M.length;M.push(K);e:for(;0<S;){var X=S-1>>>1,Z=M[X];if(0<i(Z,K))M[X]=K,M[S]=Z,S=X;else break e}}function n(M){return M.length===0?null:M[0]}function r(M){if(M.length===0)return null;var K=M[0],S=M.pop();if(S!==K){M[0]=S;e:for(var X=0,Z=M.length,_=Z>>>1;X<_;){var O=2*(X+1)-1,N=M[O],F=O+1,G=M[F];if(0>i(N,S))F<Z&&0>i(G,N)?(M[X]=G,M[F]=S,X=F):(M[X]=N,M[O]=S,X=O);else if(F<Z&&0>i(G,S))M[X]=G,M[F]=S,X=F;else break e}}return K}function i(M,K){var S=M.sortIndex-K.sortIndex;return S!==0?S:M.id-K.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var s=Date,l=s.now();e.unstable_now=function(){return s.now()-l}}var a=[],u=[],c=1,d=null,h=3,p=!1,y=!1,v=!1,w=typeof setTimeout=="function"?setTimeout:null,x=typeof clearTimeout=="function"?clearTimeout:null,m=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function g(M){for(var K=n(u);K!==null;){if(K.callback===null)r(u);else if(K.startTime<=M)r(u),K.sortIndex=K.expirationTime,t(a,K);else break;K=n(u)}}function k(M){if(v=!1,g(M),!y)if(n(a)!==null)y=!0,B(C);else{var K=n(u);K!==null&&W(k,K.startTime-M)}}function C(M,K){y=!1,v&&(v=!1,x(T),T=-1),p=!0;var S=h;try{for(g(K),d=n(a);d!==null&&(!(d.expirationTime>K)||M&&!R());){var X=d.callback;if(typeof X=="function"){d.callback=null,h=d.priorityLevel;var Z=X(d.expirationTime<=K);K=e.unstable_now(),typeof Z=="function"?d.callback=Z:d===n(a)&&r(a),g(K)}else r(a);d=n(a)}if(d!==null)var _=!0;else{var O=n(u);O!==null&&W(k,O.startTime-K),_=!1}return _}finally{d=null,h=S,p=!1}}var E=!1,A=null,T=-1,L=5,b=-1;function R(){return!(e.unstable_now()-b<L)}function $(){if(A!==null){var M=e.unstable_now();b=M;var K=!0;try{K=A(!0,M)}finally{K?P():(E=!1,A=null)}}else E=!1}var P;if(typeof m=="function")P=function(){m($)};else if(typeof MessageChannel<"u"){var I=new MessageChannel,z=I.port2;I.port1.onmessage=$,P=function(){z.postMessage(null)}}else P=function(){w($,0)};function B(M){A=M,E||(E=!0,P())}function W(M,K){T=w(function(){M(e.unstable_now())},K)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(M){M.callback=null},e.unstable_continueExecution=function(){y||p||(y=!0,B(C))},e.unstable_forceFrameRate=function(M){0>M||125<M?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):L=0<M?Math.floor(1e3/M):5},e.unstable_getCurrentPriorityLevel=function(){return h},e.unstable_getFirstCallbackNode=function(){return n(a)},e.unstable_next=function(M){switch(h){case 1:case 2:case 3:var K=3;break;default:K=h}var S=h;h=K;try{return M()}finally{h=S}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(M,K){switch(M){case 1:case 2:case 3:case 4:case 5:break;default:M=3}var S=h;h=M;try{return K()}finally{h=S}},e.unstable_scheduleCallback=function(M,K,S){var X=e.unstable_now();switch(typeof S=="object"&&S!==null?(S=S.delay,S=typeof S=="number"&&0<S?X+S:X):S=X,M){case 1:var Z=-1;break;case 2:Z=250;break;case 5:Z=1073741823;break;case 4:Z=1e4;break;default:Z=5e3}return Z=S+Z,M={id:c++,callback:K,priorityLevel:M,startTime:S,expirationTime:Z,sortIndex:-1},S>X?(M.sortIndex=S,t(u,M),n(a)===null&&M===n(u)&&(v?(x(T),T=-1):v=!0,W(k,S-X))):(M.sortIndex=Z,t(a,M),y||p||(y=!0,B(C))),M},e.unstable_shouldYield=R,e.unstable_wrapCallback=function(M){var K=h;return function(){var S=h;h=K;try{return M.apply(this,arguments)}finally{h=S}}}})(dm);cm.exports=dm;var Xv=cm.exports;/**
|
|
26
|
+
* @license React
|
|
27
|
+
* react-dom.production.min.js
|
|
28
|
+
*
|
|
29
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
30
|
+
*
|
|
31
|
+
* This source code is licensed under the MIT license found in the
|
|
32
|
+
* LICENSE file in the root directory of this source tree.
|
|
33
|
+
*/var Qv=U,Ht=Xv;function se(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var fm=new Set,po={};function Dr(e,t){mi(e,t),mi(e+"Capture",t)}function mi(e,t){for(po[e]=t,e=0;e<t.length;e++)fm.add(t[e])}var Rn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),nu=Object.prototype.hasOwnProperty,Zv=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,ff={},pf={};function Jv(e){return nu.call(pf,e)?!0:nu.call(ff,e)?!1:Zv.test(e)?pf[e]=!0:(ff[e]=!0,!1)}function ew(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function tw(e,t,n,r){if(t===null||typeof t>"u"||ew(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Ct(e,t,n,r,i,o,s){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=s}var gt={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){gt[e]=new Ct(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];gt[t]=new Ct(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){gt[e]=new Ct(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){gt[e]=new Ct(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){gt[e]=new Ct(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){gt[e]=new Ct(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){gt[e]=new Ct(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){gt[e]=new Ct(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){gt[e]=new Ct(e,5,!1,e.toLowerCase(),null,!1,!1)});var Ic=/[\-:]([a-z])/g;function Lc(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(Ic,Lc);gt[t]=new Ct(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(Ic,Lc);gt[t]=new Ct(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(Ic,Lc);gt[t]=new Ct(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){gt[e]=new Ct(e,1,!1,e.toLowerCase(),null,!1,!1)});gt.xlinkHref=new Ct("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){gt[e]=new Ct(e,1,!1,e.toLowerCase(),null,!0,!0)});function Ac(e,t,n,r){var i=gt.hasOwnProperty(t)?gt[t]:null;(i!==null?i.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(tw(t,n,i,r)&&(n=null),r||i===null?Jv(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):i.mustUseProperty?e[i.propertyName]=n===null?i.type===3?!1:"":n:(t=i.attributeName,r=i.attributeNamespace,n===null?e.removeAttribute(t):(i=i.type,n=i===3||i===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var zn=Qv.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Ko=Symbol.for("react.element"),Kr=Symbol.for("react.portal"),qr=Symbol.for("react.fragment"),Oc=Symbol.for("react.strict_mode"),ru=Symbol.for("react.profiler"),pm=Symbol.for("react.provider"),hm=Symbol.for("react.context"),Rc=Symbol.for("react.forward_ref"),iu=Symbol.for("react.suspense"),ou=Symbol.for("react.suspense_list"),Mc=Symbol.for("react.memo"),Gn=Symbol.for("react.lazy"),mm=Symbol.for("react.offscreen"),hf=Symbol.iterator;function Li(e){return e===null||typeof e!="object"?null:(e=hf&&e[hf]||e["@@iterator"],typeof e=="function"?e:null)}var Ge=Object.assign,Jl;function Gi(e){if(Jl===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);Jl=t&&t[1]||""}return`
|
|
34
|
+
`+Jl+e}var ea=!1;function ta(e,t){if(!e||ea)return"";ea=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(u){var r=u}Reflect.construct(e,[],t)}else{try{t.call()}catch(u){r=u}e.call(t.prototype)}else{try{throw Error()}catch(u){r=u}e()}}catch(u){if(u&&r&&typeof u.stack=="string"){for(var i=u.stack.split(`
|
|
35
|
+
`),o=r.stack.split(`
|
|
36
|
+
`),s=i.length-1,l=o.length-1;1<=s&&0<=l&&i[s]!==o[l];)l--;for(;1<=s&&0<=l;s--,l--)if(i[s]!==o[l]){if(s!==1||l!==1)do if(s--,l--,0>l||i[s]!==o[l]){var a=`
|
|
37
|
+
`+i[s].replace(" at new "," at ");return e.displayName&&a.includes("<anonymous>")&&(a=a.replace("<anonymous>",e.displayName)),a}while(1<=s&&0<=l);break}}}finally{ea=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Gi(e):""}function nw(e){switch(e.tag){case 5:return Gi(e.type);case 16:return Gi("Lazy");case 13:return Gi("Suspense");case 19:return Gi("SuspenseList");case 0:case 2:case 15:return e=ta(e.type,!1),e;case 11:return e=ta(e.type.render,!1),e;case 1:return e=ta(e.type,!0),e;default:return""}}function su(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case qr:return"Fragment";case Kr:return"Portal";case ru:return"Profiler";case Oc:return"StrictMode";case iu:return"Suspense";case ou:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case hm:return(e.displayName||"Context")+".Consumer";case pm:return(e._context.displayName||"Context")+".Provider";case Rc:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Mc:return t=e.displayName||null,t!==null?t:su(e.type)||"Memo";case Gn:t=e._payload,e=e._init;try{return su(e(t))}catch{}}return null}function rw(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return su(t);case 8:return t===Oc?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function lr(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function gm(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function iw(e){var t=gm(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(s){r=""+s,o.call(this,s)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(s){r=""+s},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function qo(e){e._valueTracker||(e._valueTracker=iw(e))}function ym(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=gm(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Ds(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function lu(e,t){var n=t.checked;return Ge({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function mf(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=lr(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function xm(e,t){t=t.checked,t!=null&&Ac(e,"checked",t,!1)}function au(e,t){xm(e,t);var n=lr(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?uu(e,t.type,n):t.hasOwnProperty("defaultValue")&&uu(e,t.type,lr(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function gf(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function uu(e,t,n){(t!=="number"||Ds(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Ki=Array.isArray;function si(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t["$"+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty("$"+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=""+lr(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function cu(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(se(91));return Ge({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function yf(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(se(92));if(Ki(n)){if(1<n.length)throw Error(se(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:lr(n)}}function vm(e,t){var n=lr(t.value),r=lr(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=""+r)}function xf(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function wm(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function du(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?wm(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Yo,km=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,i){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,i)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(Yo=Yo||document.createElement("div"),Yo.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Yo.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function ho(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Qi={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},ow=["Webkit","ms","Moz","O"];Object.keys(Qi).forEach(function(e){ow.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Qi[t]=Qi[e]})});function bm(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Qi.hasOwnProperty(e)&&Qi[e]?(""+t).trim():t+"px"}function Em(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=bm(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var sw=Ge({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function fu(e,t){if(t){if(sw[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(se(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(se(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(se(61))}if(t.style!=null&&typeof t.style!="object")throw Error(se(62))}}function pu(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var hu=null;function Pc(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var mu=null,li=null,ai=null;function vf(e){if(e=Po(e)){if(typeof mu!="function")throw Error(se(280));var t=e.stateNode;t&&(t=jl(t),mu(e.stateNode,e.type,t))}}function Sm(e){li?ai?ai.push(e):ai=[e]:li=e}function Cm(){if(li){var e=li,t=ai;if(ai=li=null,vf(e),t)for(e=0;e<t.length;e++)vf(t[e])}}function Nm(e,t){return e(t)}function jm(){}var na=!1;function _m(e,t,n){if(na)return e(t,n);na=!0;try{return Nm(e,t,n)}finally{na=!1,(li!==null||ai!==null)&&(jm(),Cm())}}function mo(e,t){var n=e.stateNode;if(n===null)return null;var r=jl(n);if(r===null)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(se(231,t,typeof n));return n}var gu=!1;if(Rn)try{var Ai={};Object.defineProperty(Ai,"passive",{get:function(){gu=!0}}),window.addEventListener("test",Ai,Ai),window.removeEventListener("test",Ai,Ai)}catch{gu=!1}function lw(e,t,n,r,i,o,s,l,a){var u=Array.prototype.slice.call(arguments,3);try{t.apply(n,u)}catch(c){this.onError(c)}}var Zi=!1,zs=null,Bs=!1,yu=null,aw={onError:function(e){Zi=!0,zs=e}};function uw(e,t,n,r,i,o,s,l,a){Zi=!1,zs=null,lw.apply(aw,arguments)}function cw(e,t,n,r,i,o,s,l,a){if(uw.apply(this,arguments),Zi){if(Zi){var u=zs;Zi=!1,zs=null}else throw Error(se(198));Bs||(Bs=!0,yu=u)}}function zr(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function Tm(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function wf(e){if(zr(e)!==e)throw Error(se(188))}function dw(e){var t=e.alternate;if(!t){if(t=zr(e),t===null)throw Error(se(188));return t!==e?null:e}for(var n=e,r=t;;){var i=n.return;if(i===null)break;var o=i.alternate;if(o===null){if(r=i.return,r!==null){n=r;continue}break}if(i.child===o.child){for(o=i.child;o;){if(o===n)return wf(i),e;if(o===r)return wf(i),t;o=o.sibling}throw Error(se(188))}if(n.return!==r.return)n=i,r=o;else{for(var s=!1,l=i.child;l;){if(l===n){s=!0,n=i,r=o;break}if(l===r){s=!0,r=i,n=o;break}l=l.sibling}if(!s){for(l=o.child;l;){if(l===n){s=!0,n=o,r=i;break}if(l===r){s=!0,r=o,n=i;break}l=l.sibling}if(!s)throw Error(se(189))}}if(n.alternate!==r)throw Error(se(190))}if(n.tag!==3)throw Error(se(188));return n.stateNode.current===n?e:t}function $m(e){return e=dw(e),e!==null?Im(e):null}function Im(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=Im(e);if(t!==null)return t;e=e.sibling}return null}var Lm=Ht.unstable_scheduleCallback,kf=Ht.unstable_cancelCallback,fw=Ht.unstable_shouldYield,pw=Ht.unstable_requestPaint,Ye=Ht.unstable_now,hw=Ht.unstable_getCurrentPriorityLevel,Fc=Ht.unstable_ImmediatePriority,Am=Ht.unstable_UserBlockingPriority,Us=Ht.unstable_NormalPriority,mw=Ht.unstable_LowPriority,Om=Ht.unstable_IdlePriority,El=null,Sn=null;function gw(e){if(Sn&&typeof Sn.onCommitFiberRoot=="function")try{Sn.onCommitFiberRoot(El,e,void 0,(e.current.flags&128)===128)}catch{}}var fn=Math.clz32?Math.clz32:vw,yw=Math.log,xw=Math.LN2;function vw(e){return e>>>=0,e===0?32:31-(yw(e)/xw|0)|0}var Xo=64,Qo=4194304;function qi(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Hs(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,o=e.pingedLanes,s=n&268435455;if(s!==0){var l=s&~i;l!==0?r=qi(l):(o&=s,o!==0&&(r=qi(o)))}else s=n&~i,s!==0?r=qi(s):o!==0&&(r=qi(o));if(r===0)return 0;if(t!==0&&t!==r&&!(t&i)&&(i=r&-r,o=t&-t,i>=o||i===16&&(o&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-fn(t),i=1<<n,r|=e[n],t&=~i;return r}function ww(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function kw(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,o=e.pendingLanes;0<o;){var s=31-fn(o),l=1<<s,a=i[s];a===-1?(!(l&n)||l&r)&&(i[s]=ww(l,t)):a<=t&&(e.expiredLanes|=l),o&=~l}}function xu(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function Rm(){var e=Xo;return Xo<<=1,!(Xo&4194240)&&(Xo=64),e}function ra(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Ro(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-fn(t),e[t]=n}function bw(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var i=31-fn(n),o=1<<i;t[i]=0,r[i]=-1,e[i]=-1,n&=~o}}function Dc(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-fn(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}var Ae=0;function Mm(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var Pm,zc,Fm,Dm,zm,vu=!1,Zo=[],Jn=null,er=null,tr=null,go=new Map,yo=new Map,qn=[],Ew="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function bf(e,t){switch(e){case"focusin":case"focusout":Jn=null;break;case"dragenter":case"dragleave":er=null;break;case"mouseover":case"mouseout":tr=null;break;case"pointerover":case"pointerout":go.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":yo.delete(t.pointerId)}}function Oi(e,t,n,r,i,o){return e===null||e.nativeEvent!==o?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:o,targetContainers:[i]},t!==null&&(t=Po(t),t!==null&&zc(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Sw(e,t,n,r,i){switch(t){case"focusin":return Jn=Oi(Jn,e,t,n,r,i),!0;case"dragenter":return er=Oi(er,e,t,n,r,i),!0;case"mouseover":return tr=Oi(tr,e,t,n,r,i),!0;case"pointerover":var o=i.pointerId;return go.set(o,Oi(go.get(o)||null,e,t,n,r,i)),!0;case"gotpointercapture":return o=i.pointerId,yo.set(o,Oi(yo.get(o)||null,e,t,n,r,i)),!0}return!1}function Bm(e){var t=br(e.target);if(t!==null){var n=zr(t);if(n!==null){if(t=n.tag,t===13){if(t=Tm(n),t!==null){e.blockedOn=t,zm(e.priority,function(){Fm(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function bs(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=wu(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);hu=r,n.target.dispatchEvent(r),hu=null}else return t=Po(n),t!==null&&zc(t),e.blockedOn=n,!1;t.shift()}return!0}function Ef(e,t,n){bs(e)&&n.delete(t)}function Cw(){vu=!1,Jn!==null&&bs(Jn)&&(Jn=null),er!==null&&bs(er)&&(er=null),tr!==null&&bs(tr)&&(tr=null),go.forEach(Ef),yo.forEach(Ef)}function Ri(e,t){e.blockedOn===t&&(e.blockedOn=null,vu||(vu=!0,Ht.unstable_scheduleCallback(Ht.unstable_NormalPriority,Cw)))}function xo(e){function t(i){return Ri(i,e)}if(0<Zo.length){Ri(Zo[0],e);for(var n=1;n<Zo.length;n++){var r=Zo[n];r.blockedOn===e&&(r.blockedOn=null)}}for(Jn!==null&&Ri(Jn,e),er!==null&&Ri(er,e),tr!==null&&Ri(tr,e),go.forEach(t),yo.forEach(t),n=0;n<qn.length;n++)r=qn[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<qn.length&&(n=qn[0],n.blockedOn===null);)Bm(n),n.blockedOn===null&&qn.shift()}var ui=zn.ReactCurrentBatchConfig,Ws=!0;function Nw(e,t,n,r){var i=Ae,o=ui.transition;ui.transition=null;try{Ae=1,Bc(e,t,n,r)}finally{Ae=i,ui.transition=o}}function jw(e,t,n,r){var i=Ae,o=ui.transition;ui.transition=null;try{Ae=4,Bc(e,t,n,r)}finally{Ae=i,ui.transition=o}}function Bc(e,t,n,r){if(Ws){var i=wu(e,t,n,r);if(i===null)pa(e,t,r,Vs,n),bf(e,r);else if(Sw(i,e,t,n,r))r.stopPropagation();else if(bf(e,r),t&4&&-1<Ew.indexOf(e)){for(;i!==null;){var o=Po(i);if(o!==null&&Pm(o),o=wu(e,t,n,r),o===null&&pa(e,t,r,Vs,n),o===i)break;i=o}i!==null&&r.stopPropagation()}else pa(e,t,r,null,n)}}var Vs=null;function wu(e,t,n,r){if(Vs=null,e=Pc(r),e=br(e),e!==null)if(t=zr(e),t===null)e=null;else if(n=t.tag,n===13){if(e=Tm(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return Vs=e,null}function Um(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(hw()){case Fc:return 1;case Am:return 4;case Us:case mw:return 16;case Om:return 536870912;default:return 16}default:return 16}}var Qn=null,Uc=null,Es=null;function Hm(){if(Es)return Es;var e,t=Uc,n=t.length,r,i="value"in Qn?Qn.value:Qn.textContent,o=i.length;for(e=0;e<n&&t[e]===i[e];e++);var s=n-e;for(r=1;r<=s&&t[n-r]===i[o-r];r++);return Es=i.slice(e,1<r?1-r:void 0)}function Ss(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Jo(){return!0}function Sf(){return!1}function Vt(e){function t(n,r,i,o,s){this._reactName=n,this._targetInst=i,this.type=r,this.nativeEvent=o,this.target=s,this.currentTarget=null;for(var l in e)e.hasOwnProperty(l)&&(n=e[l],this[l]=n?n(o):o[l]);return this.isDefaultPrevented=(o.defaultPrevented!=null?o.defaultPrevented:o.returnValue===!1)?Jo:Sf,this.isPropagationStopped=Sf,this}return Ge(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=Jo)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Jo)},persist:function(){},isPersistent:Jo}),t}var Ni={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Hc=Vt(Ni),Mo=Ge({},Ni,{view:0,detail:0}),_w=Vt(Mo),ia,oa,Mi,Sl=Ge({},Mo,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Wc,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==Mi&&(Mi&&e.type==="mousemove"?(ia=e.screenX-Mi.screenX,oa=e.screenY-Mi.screenY):oa=ia=0,Mi=e),ia)},movementY:function(e){return"movementY"in e?e.movementY:oa}}),Cf=Vt(Sl),Tw=Ge({},Sl,{dataTransfer:0}),$w=Vt(Tw),Iw=Ge({},Mo,{relatedTarget:0}),sa=Vt(Iw),Lw=Ge({},Ni,{animationName:0,elapsedTime:0,pseudoElement:0}),Aw=Vt(Lw),Ow=Ge({},Ni,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Rw=Vt(Ow),Mw=Ge({},Ni,{data:0}),Nf=Vt(Mw),Pw={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Fw={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},Dw={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function zw(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Dw[e])?!!t[e]:!1}function Wc(){return zw}var Bw=Ge({},Mo,{key:function(e){if(e.key){var t=Pw[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Ss(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Fw[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Wc,charCode:function(e){return e.type==="keypress"?Ss(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Ss(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Uw=Vt(Bw),Hw=Ge({},Sl,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),jf=Vt(Hw),Ww=Ge({},Mo,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Wc}),Vw=Vt(Ww),Gw=Ge({},Ni,{propertyName:0,elapsedTime:0,pseudoElement:0}),Kw=Vt(Gw),qw=Ge({},Sl,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),Yw=Vt(qw),Xw=[9,13,27,32],Vc=Rn&&"CompositionEvent"in window,Ji=null;Rn&&"documentMode"in document&&(Ji=document.documentMode);var Qw=Rn&&"TextEvent"in window&&!Ji,Wm=Rn&&(!Vc||Ji&&8<Ji&&11>=Ji),_f=" ",Tf=!1;function Vm(e,t){switch(e){case"keyup":return Xw.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Gm(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Yr=!1;function Zw(e,t){switch(e){case"compositionend":return Gm(t);case"keypress":return t.which!==32?null:(Tf=!0,_f);case"textInput":return e=t.data,e===_f&&Tf?null:e;default:return null}}function Jw(e,t){if(Yr)return e==="compositionend"||!Vc&&Vm(e,t)?(e=Hm(),Es=Uc=Qn=null,Yr=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Wm&&t.locale!=="ko"?null:t.data;default:return null}}var ek={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function $f(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!ek[e.type]:t==="textarea"}function Km(e,t,n,r){Sm(r),t=Gs(t,"onChange"),0<t.length&&(n=new Hc("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var eo=null,vo=null;function tk(e){ig(e,0)}function Cl(e){var t=Zr(e);if(ym(t))return e}function nk(e,t){if(e==="change")return t}var qm=!1;if(Rn){var la;if(Rn){var aa="oninput"in document;if(!aa){var If=document.createElement("div");If.setAttribute("oninput","return;"),aa=typeof If.oninput=="function"}la=aa}else la=!1;qm=la&&(!document.documentMode||9<document.documentMode)}function Lf(){eo&&(eo.detachEvent("onpropertychange",Ym),vo=eo=null)}function Ym(e){if(e.propertyName==="value"&&Cl(vo)){var t=[];Km(t,vo,e,Pc(e)),_m(tk,t)}}function rk(e,t,n){e==="focusin"?(Lf(),eo=t,vo=n,eo.attachEvent("onpropertychange",Ym)):e==="focusout"&&Lf()}function ik(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Cl(vo)}function ok(e,t){if(e==="click")return Cl(t)}function sk(e,t){if(e==="input"||e==="change")return Cl(t)}function lk(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var yn=typeof Object.is=="function"?Object.is:lk;function wo(e,t){if(yn(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!nu.call(t,i)||!yn(e[i],t[i]))return!1}return!0}function Af(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Of(e,t){var n=Af(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Af(n)}}function Xm(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Xm(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Qm(){for(var e=window,t=Ds();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Ds(e.document)}return t}function Gc(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function ak(e){var t=Qm(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Xm(n.ownerDocument.documentElement,n)){if(r!==null&&Gc(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,o=Math.min(r.start,i);r=r.end===void 0?o:Math.min(r.end,i),!e.extend&&o>r&&(i=r,r=o,o=i),i=Of(n,o);var s=Of(n,r);i&&s&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==s.node||e.focusOffset!==s.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(s.node,s.offset)):(t.setEnd(s.node,s.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var uk=Rn&&"documentMode"in document&&11>=document.documentMode,Xr=null,ku=null,to=null,bu=!1;function Rf(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;bu||Xr==null||Xr!==Ds(r)||(r=Xr,"selectionStart"in r&&Gc(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),to&&wo(to,r)||(to=r,r=Gs(ku,"onSelect"),0<r.length&&(t=new Hc("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=Xr)))}function es(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Qr={animationend:es("Animation","AnimationEnd"),animationiteration:es("Animation","AnimationIteration"),animationstart:es("Animation","AnimationStart"),transitionend:es("Transition","TransitionEnd")},ua={},Zm={};Rn&&(Zm=document.createElement("div").style,"AnimationEvent"in window||(delete Qr.animationend.animation,delete Qr.animationiteration.animation,delete Qr.animationstart.animation),"TransitionEvent"in window||delete Qr.transitionend.transition);function Nl(e){if(ua[e])return ua[e];if(!Qr[e])return e;var t=Qr[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Zm)return ua[e]=t[n];return e}var Jm=Nl("animationend"),eg=Nl("animationiteration"),tg=Nl("animationstart"),ng=Nl("transitionend"),rg=new Map,Mf="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function dr(e,t){rg.set(e,t),Dr(t,[e])}for(var ca=0;ca<Mf.length;ca++){var da=Mf[ca],ck=da.toLowerCase(),dk=da[0].toUpperCase()+da.slice(1);dr(ck,"on"+dk)}dr(Jm,"onAnimationEnd");dr(eg,"onAnimationIteration");dr(tg,"onAnimationStart");dr("dblclick","onDoubleClick");dr("focusin","onFocus");dr("focusout","onBlur");dr(ng,"onTransitionEnd");mi("onMouseEnter",["mouseout","mouseover"]);mi("onMouseLeave",["mouseout","mouseover"]);mi("onPointerEnter",["pointerout","pointerover"]);mi("onPointerLeave",["pointerout","pointerover"]);Dr("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Dr("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Dr("onBeforeInput",["compositionend","keypress","textInput","paste"]);Dr("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Dr("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Dr("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Yi="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),fk=new Set("cancel close invalid load scroll toggle".split(" ").concat(Yi));function Pf(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,cw(r,t,void 0,e),e.currentTarget=null}function ig(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;e:{var o=void 0;if(t)for(var s=r.length-1;0<=s;s--){var l=r[s],a=l.instance,u=l.currentTarget;if(l=l.listener,a!==o&&i.isPropagationStopped())break e;Pf(i,l,u),o=a}else for(s=0;s<r.length;s++){if(l=r[s],a=l.instance,u=l.currentTarget,l=l.listener,a!==o&&i.isPropagationStopped())break e;Pf(i,l,u),o=a}}}if(Bs)throw e=yu,Bs=!1,yu=null,e}function ze(e,t){var n=t[ju];n===void 0&&(n=t[ju]=new Set);var r=e+"__bubble";n.has(r)||(og(t,e,2,!1),n.add(r))}function fa(e,t,n){var r=0;t&&(r|=4),og(n,e,r,t)}var ts="_reactListening"+Math.random().toString(36).slice(2);function ko(e){if(!e[ts]){e[ts]=!0,fm.forEach(function(n){n!=="selectionchange"&&(fk.has(n)||fa(n,!1,e),fa(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[ts]||(t[ts]=!0,fa("selectionchange",!1,t))}}function og(e,t,n,r){switch(Um(t)){case 1:var i=Nw;break;case 4:i=jw;break;default:i=Bc}n=i.bind(null,t,n,e),i=void 0,!gu||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(i=!0),r?i!==void 0?e.addEventListener(t,n,{capture:!0,passive:i}):e.addEventListener(t,n,!0):i!==void 0?e.addEventListener(t,n,{passive:i}):e.addEventListener(t,n,!1)}function pa(e,t,n,r,i){var o=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var s=r.tag;if(s===3||s===4){var l=r.stateNode.containerInfo;if(l===i||l.nodeType===8&&l.parentNode===i)break;if(s===4)for(s=r.return;s!==null;){var a=s.tag;if((a===3||a===4)&&(a=s.stateNode.containerInfo,a===i||a.nodeType===8&&a.parentNode===i))return;s=s.return}for(;l!==null;){if(s=br(l),s===null)return;if(a=s.tag,a===5||a===6){r=o=s;continue e}l=l.parentNode}}r=r.return}_m(function(){var u=o,c=Pc(n),d=[];e:{var h=rg.get(e);if(h!==void 0){var p=Hc,y=e;switch(e){case"keypress":if(Ss(n)===0)break e;case"keydown":case"keyup":p=Uw;break;case"focusin":y="focus",p=sa;break;case"focusout":y="blur",p=sa;break;case"beforeblur":case"afterblur":p=sa;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":p=Cf;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":p=$w;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":p=Vw;break;case Jm:case eg:case tg:p=Aw;break;case ng:p=Kw;break;case"scroll":p=_w;break;case"wheel":p=Yw;break;case"copy":case"cut":case"paste":p=Rw;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":p=jf}var v=(t&4)!==0,w=!v&&e==="scroll",x=v?h!==null?h+"Capture":null:h;v=[];for(var m=u,g;m!==null;){g=m;var k=g.stateNode;if(g.tag===5&&k!==null&&(g=k,x!==null&&(k=mo(m,x),k!=null&&v.push(bo(m,k,g)))),w)break;m=m.return}0<v.length&&(h=new p(h,y,null,n,c),d.push({event:h,listeners:v}))}}if(!(t&7)){e:{if(h=e==="mouseover"||e==="pointerover",p=e==="mouseout"||e==="pointerout",h&&n!==hu&&(y=n.relatedTarget||n.fromElement)&&(br(y)||y[Mn]))break e;if((p||h)&&(h=c.window===c?c:(h=c.ownerDocument)?h.defaultView||h.parentWindow:window,p?(y=n.relatedTarget||n.toElement,p=u,y=y?br(y):null,y!==null&&(w=zr(y),y!==w||y.tag!==5&&y.tag!==6)&&(y=null)):(p=null,y=u),p!==y)){if(v=Cf,k="onMouseLeave",x="onMouseEnter",m="mouse",(e==="pointerout"||e==="pointerover")&&(v=jf,k="onPointerLeave",x="onPointerEnter",m="pointer"),w=p==null?h:Zr(p),g=y==null?h:Zr(y),h=new v(k,m+"leave",p,n,c),h.target=w,h.relatedTarget=g,k=null,br(c)===u&&(v=new v(x,m+"enter",y,n,c),v.target=g,v.relatedTarget=w,k=v),w=k,p&&y)t:{for(v=p,x=y,m=0,g=v;g;g=Hr(g))m++;for(g=0,k=x;k;k=Hr(k))g++;for(;0<m-g;)v=Hr(v),m--;for(;0<g-m;)x=Hr(x),g--;for(;m--;){if(v===x||x!==null&&v===x.alternate)break t;v=Hr(v),x=Hr(x)}v=null}else v=null;p!==null&&Ff(d,h,p,v,!1),y!==null&&w!==null&&Ff(d,w,y,v,!0)}}e:{if(h=u?Zr(u):window,p=h.nodeName&&h.nodeName.toLowerCase(),p==="select"||p==="input"&&h.type==="file")var C=nk;else if($f(h))if(qm)C=sk;else{C=ik;var E=rk}else(p=h.nodeName)&&p.toLowerCase()==="input"&&(h.type==="checkbox"||h.type==="radio")&&(C=ok);if(C&&(C=C(e,u))){Km(d,C,n,c);break e}E&&E(e,h,u),e==="focusout"&&(E=h._wrapperState)&&E.controlled&&h.type==="number"&&uu(h,"number",h.value)}switch(E=u?Zr(u):window,e){case"focusin":($f(E)||E.contentEditable==="true")&&(Xr=E,ku=u,to=null);break;case"focusout":to=ku=Xr=null;break;case"mousedown":bu=!0;break;case"contextmenu":case"mouseup":case"dragend":bu=!1,Rf(d,n,c);break;case"selectionchange":if(uk)break;case"keydown":case"keyup":Rf(d,n,c)}var A;if(Vc)e:{switch(e){case"compositionstart":var T="onCompositionStart";break e;case"compositionend":T="onCompositionEnd";break e;case"compositionupdate":T="onCompositionUpdate";break e}T=void 0}else Yr?Vm(e,n)&&(T="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(T="onCompositionStart");T&&(Wm&&n.locale!=="ko"&&(Yr||T!=="onCompositionStart"?T==="onCompositionEnd"&&Yr&&(A=Hm()):(Qn=c,Uc="value"in Qn?Qn.value:Qn.textContent,Yr=!0)),E=Gs(u,T),0<E.length&&(T=new Nf(T,e,null,n,c),d.push({event:T,listeners:E}),A?T.data=A:(A=Gm(n),A!==null&&(T.data=A)))),(A=Qw?Zw(e,n):Jw(e,n))&&(u=Gs(u,"onBeforeInput"),0<u.length&&(c=new Nf("onBeforeInput","beforeinput",null,n,c),d.push({event:c,listeners:u}),c.data=A))}ig(d,t)})}function bo(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Gs(e,t){for(var n=t+"Capture",r=[];e!==null;){var i=e,o=i.stateNode;i.tag===5&&o!==null&&(i=o,o=mo(e,n),o!=null&&r.unshift(bo(e,o,i)),o=mo(e,t),o!=null&&r.push(bo(e,o,i))),e=e.return}return r}function Hr(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function Ff(e,t,n,r,i){for(var o=t._reactName,s=[];n!==null&&n!==r;){var l=n,a=l.alternate,u=l.stateNode;if(a!==null&&a===r)break;l.tag===5&&u!==null&&(l=u,i?(a=mo(n,o),a!=null&&s.unshift(bo(n,a,l))):i||(a=mo(n,o),a!=null&&s.push(bo(n,a,l)))),n=n.return}s.length!==0&&e.push({event:t,listeners:s})}var pk=/\r\n?/g,hk=/\u0000|\uFFFD/g;function Df(e){return(typeof e=="string"?e:""+e).replace(pk,`
|
|
38
|
+
`).replace(hk,"")}function ns(e,t,n){if(t=Df(t),Df(e)!==t&&n)throw Error(se(425))}function Ks(){}var Eu=null,Su=null;function Cu(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Nu=typeof setTimeout=="function"?setTimeout:void 0,mk=typeof clearTimeout=="function"?clearTimeout:void 0,zf=typeof Promise=="function"?Promise:void 0,gk=typeof queueMicrotask=="function"?queueMicrotask:typeof zf<"u"?function(e){return zf.resolve(null).then(e).catch(yk)}:Nu;function yk(e){setTimeout(function(){throw e})}function ha(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n==="/$"){if(r===0){e.removeChild(i),xo(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=i}while(n);xo(t)}function nr(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function Bf(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var ji=Math.random().toString(36).slice(2),En="__reactFiber$"+ji,Eo="__reactProps$"+ji,Mn="__reactContainer$"+ji,ju="__reactEvents$"+ji,xk="__reactListeners$"+ji,vk="__reactHandles$"+ji;function br(e){var t=e[En];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Mn]||n[En]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Bf(e);e!==null;){if(n=e[En])return n;e=Bf(e)}return t}e=n,n=e.parentNode}return null}function Po(e){return e=e[En]||e[Mn],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Zr(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(se(33))}function jl(e){return e[Eo]||null}var _u=[],Jr=-1;function fr(e){return{current:e}}function Be(e){0>Jr||(e.current=_u[Jr],_u[Jr]=null,Jr--)}function De(e,t){Jr++,_u[Jr]=e.current,e.current=t}var ar={},wt=fr(ar),Lt=fr(!1),Ir=ar;function gi(e,t){var n=e.type.contextTypes;if(!n)return ar;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},o;for(o in n)i[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function At(e){return e=e.childContextTypes,e!=null}function qs(){Be(Lt),Be(wt)}function Uf(e,t,n){if(wt.current!==ar)throw Error(se(168));De(wt,t),De(Lt,n)}function sg(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(se(108,rw(e)||"Unknown",i));return Ge({},n,r)}function Ys(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||ar,Ir=wt.current,De(wt,e),De(Lt,Lt.current),!0}function Hf(e,t,n){var r=e.stateNode;if(!r)throw Error(se(169));n?(e=sg(e,t,Ir),r.__reactInternalMemoizedMergedChildContext=e,Be(Lt),Be(wt),De(wt,e)):Be(Lt),De(Lt,n)}var In=null,_l=!1,ma=!1;function lg(e){In===null?In=[e]:In.push(e)}function wk(e){_l=!0,lg(e)}function pr(){if(!ma&&In!==null){ma=!0;var e=0,t=Ae;try{var n=In;for(Ae=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}In=null,_l=!1}catch(i){throw In!==null&&(In=In.slice(e+1)),Lm(Fc,pr),i}finally{Ae=t,ma=!1}}return null}var ei=[],ti=0,Xs=null,Qs=0,Qt=[],Zt=0,Lr=null,Ln=1,An="";function xr(e,t){ei[ti++]=Qs,ei[ti++]=Xs,Xs=e,Qs=t}function ag(e,t,n){Qt[Zt++]=Ln,Qt[Zt++]=An,Qt[Zt++]=Lr,Lr=e;var r=Ln;e=An;var i=32-fn(r)-1;r&=~(1<<i),n+=1;var o=32-fn(t)+i;if(30<o){var s=i-i%5;o=(r&(1<<s)-1).toString(32),r>>=s,i-=s,Ln=1<<32-fn(t)+i|n<<i|r,An=o+e}else Ln=1<<o|n<<i|r,An=e}function Kc(e){e.return!==null&&(xr(e,1),ag(e,1,0))}function qc(e){for(;e===Xs;)Xs=ei[--ti],ei[ti]=null,Qs=ei[--ti],ei[ti]=null;for(;e===Lr;)Lr=Qt[--Zt],Qt[Zt]=null,An=Qt[--Zt],Qt[Zt]=null,Ln=Qt[--Zt],Qt[Zt]=null}var Ut=null,Bt=null,He=!1,cn=null;function ug(e,t){var n=en(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function Wf(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,Ut=e,Bt=nr(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Ut=e,Bt=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=Lr!==null?{id:Ln,overflow:An}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=en(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,Ut=e,Bt=null,!0):!1;default:return!1}}function Tu(e){return(e.mode&1)!==0&&(e.flags&128)===0}function $u(e){if(He){var t=Bt;if(t){var n=t;if(!Wf(e,t)){if(Tu(e))throw Error(se(418));t=nr(n.nextSibling);var r=Ut;t&&Wf(e,t)?ug(r,n):(e.flags=e.flags&-4097|2,He=!1,Ut=e)}}else{if(Tu(e))throw Error(se(418));e.flags=e.flags&-4097|2,He=!1,Ut=e}}}function Vf(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Ut=e}function rs(e){if(e!==Ut)return!1;if(!He)return Vf(e),He=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!Cu(e.type,e.memoizedProps)),t&&(t=Bt)){if(Tu(e))throw cg(),Error(se(418));for(;t;)ug(e,t),t=nr(t.nextSibling)}if(Vf(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(se(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){Bt=nr(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}Bt=null}}else Bt=Ut?nr(e.stateNode.nextSibling):null;return!0}function cg(){for(var e=Bt;e;)e=nr(e.nextSibling)}function yi(){Bt=Ut=null,He=!1}function Yc(e){cn===null?cn=[e]:cn.push(e)}var kk=zn.ReactCurrentBatchConfig;function Pi(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(se(309));var r=n.stateNode}if(!r)throw Error(se(147,e));var i=r,o=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===o?t.ref:(t=function(s){var l=i.refs;s===null?delete l[o]:l[o]=s},t._stringRef=o,t)}if(typeof e!="string")throw Error(se(284));if(!n._owner)throw Error(se(290,e))}return e}function is(e,t){throw e=Object.prototype.toString.call(t),Error(se(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Gf(e){var t=e._init;return t(e._payload)}function dg(e){function t(x,m){if(e){var g=x.deletions;g===null?(x.deletions=[m],x.flags|=16):g.push(m)}}function n(x,m){if(!e)return null;for(;m!==null;)t(x,m),m=m.sibling;return null}function r(x,m){for(x=new Map;m!==null;)m.key!==null?x.set(m.key,m):x.set(m.index,m),m=m.sibling;return x}function i(x,m){return x=sr(x,m),x.index=0,x.sibling=null,x}function o(x,m,g){return x.index=g,e?(g=x.alternate,g!==null?(g=g.index,g<m?(x.flags|=2,m):g):(x.flags|=2,m)):(x.flags|=1048576,m)}function s(x){return e&&x.alternate===null&&(x.flags|=2),x}function l(x,m,g,k){return m===null||m.tag!==6?(m=ba(g,x.mode,k),m.return=x,m):(m=i(m,g),m.return=x,m)}function a(x,m,g,k){var C=g.type;return C===qr?c(x,m,g.props.children,k,g.key):m!==null&&(m.elementType===C||typeof C=="object"&&C!==null&&C.$$typeof===Gn&&Gf(C)===m.type)?(k=i(m,g.props),k.ref=Pi(x,m,g),k.return=x,k):(k=Is(g.type,g.key,g.props,null,x.mode,k),k.ref=Pi(x,m,g),k.return=x,k)}function u(x,m,g,k){return m===null||m.tag!==4||m.stateNode.containerInfo!==g.containerInfo||m.stateNode.implementation!==g.implementation?(m=Ea(g,x.mode,k),m.return=x,m):(m=i(m,g.children||[]),m.return=x,m)}function c(x,m,g,k,C){return m===null||m.tag!==7?(m=jr(g,x.mode,k,C),m.return=x,m):(m=i(m,g),m.return=x,m)}function d(x,m,g){if(typeof m=="string"&&m!==""||typeof m=="number")return m=ba(""+m,x.mode,g),m.return=x,m;if(typeof m=="object"&&m!==null){switch(m.$$typeof){case Ko:return g=Is(m.type,m.key,m.props,null,x.mode,g),g.ref=Pi(x,null,m),g.return=x,g;case Kr:return m=Ea(m,x.mode,g),m.return=x,m;case Gn:var k=m._init;return d(x,k(m._payload),g)}if(Ki(m)||Li(m))return m=jr(m,x.mode,g,null),m.return=x,m;is(x,m)}return null}function h(x,m,g,k){var C=m!==null?m.key:null;if(typeof g=="string"&&g!==""||typeof g=="number")return C!==null?null:l(x,m,""+g,k);if(typeof g=="object"&&g!==null){switch(g.$$typeof){case Ko:return g.key===C?a(x,m,g,k):null;case Kr:return g.key===C?u(x,m,g,k):null;case Gn:return C=g._init,h(x,m,C(g._payload),k)}if(Ki(g)||Li(g))return C!==null?null:c(x,m,g,k,null);is(x,g)}return null}function p(x,m,g,k,C){if(typeof k=="string"&&k!==""||typeof k=="number")return x=x.get(g)||null,l(m,x,""+k,C);if(typeof k=="object"&&k!==null){switch(k.$$typeof){case Ko:return x=x.get(k.key===null?g:k.key)||null,a(m,x,k,C);case Kr:return x=x.get(k.key===null?g:k.key)||null,u(m,x,k,C);case Gn:var E=k._init;return p(x,m,g,E(k._payload),C)}if(Ki(k)||Li(k))return x=x.get(g)||null,c(m,x,k,C,null);is(m,k)}return null}function y(x,m,g,k){for(var C=null,E=null,A=m,T=m=0,L=null;A!==null&&T<g.length;T++){A.index>T?(L=A,A=null):L=A.sibling;var b=h(x,A,g[T],k);if(b===null){A===null&&(A=L);break}e&&A&&b.alternate===null&&t(x,A),m=o(b,m,T),E===null?C=b:E.sibling=b,E=b,A=L}if(T===g.length)return n(x,A),He&&xr(x,T),C;if(A===null){for(;T<g.length;T++)A=d(x,g[T],k),A!==null&&(m=o(A,m,T),E===null?C=A:E.sibling=A,E=A);return He&&xr(x,T),C}for(A=r(x,A);T<g.length;T++)L=p(A,x,T,g[T],k),L!==null&&(e&&L.alternate!==null&&A.delete(L.key===null?T:L.key),m=o(L,m,T),E===null?C=L:E.sibling=L,E=L);return e&&A.forEach(function(R){return t(x,R)}),He&&xr(x,T),C}function v(x,m,g,k){var C=Li(g);if(typeof C!="function")throw Error(se(150));if(g=C.call(g),g==null)throw Error(se(151));for(var E=C=null,A=m,T=m=0,L=null,b=g.next();A!==null&&!b.done;T++,b=g.next()){A.index>T?(L=A,A=null):L=A.sibling;var R=h(x,A,b.value,k);if(R===null){A===null&&(A=L);break}e&&A&&R.alternate===null&&t(x,A),m=o(R,m,T),E===null?C=R:E.sibling=R,E=R,A=L}if(b.done)return n(x,A),He&&xr(x,T),C;if(A===null){for(;!b.done;T++,b=g.next())b=d(x,b.value,k),b!==null&&(m=o(b,m,T),E===null?C=b:E.sibling=b,E=b);return He&&xr(x,T),C}for(A=r(x,A);!b.done;T++,b=g.next())b=p(A,x,T,b.value,k),b!==null&&(e&&b.alternate!==null&&A.delete(b.key===null?T:b.key),m=o(b,m,T),E===null?C=b:E.sibling=b,E=b);return e&&A.forEach(function($){return t(x,$)}),He&&xr(x,T),C}function w(x,m,g,k){if(typeof g=="object"&&g!==null&&g.type===qr&&g.key===null&&(g=g.props.children),typeof g=="object"&&g!==null){switch(g.$$typeof){case Ko:e:{for(var C=g.key,E=m;E!==null;){if(E.key===C){if(C=g.type,C===qr){if(E.tag===7){n(x,E.sibling),m=i(E,g.props.children),m.return=x,x=m;break e}}else if(E.elementType===C||typeof C=="object"&&C!==null&&C.$$typeof===Gn&&Gf(C)===E.type){n(x,E.sibling),m=i(E,g.props),m.ref=Pi(x,E,g),m.return=x,x=m;break e}n(x,E);break}else t(x,E);E=E.sibling}g.type===qr?(m=jr(g.props.children,x.mode,k,g.key),m.return=x,x=m):(k=Is(g.type,g.key,g.props,null,x.mode,k),k.ref=Pi(x,m,g),k.return=x,x=k)}return s(x);case Kr:e:{for(E=g.key;m!==null;){if(m.key===E)if(m.tag===4&&m.stateNode.containerInfo===g.containerInfo&&m.stateNode.implementation===g.implementation){n(x,m.sibling),m=i(m,g.children||[]),m.return=x,x=m;break e}else{n(x,m);break}else t(x,m);m=m.sibling}m=Ea(g,x.mode,k),m.return=x,x=m}return s(x);case Gn:return E=g._init,w(x,m,E(g._payload),k)}if(Ki(g))return y(x,m,g,k);if(Li(g))return v(x,m,g,k);is(x,g)}return typeof g=="string"&&g!==""||typeof g=="number"?(g=""+g,m!==null&&m.tag===6?(n(x,m.sibling),m=i(m,g),m.return=x,x=m):(n(x,m),m=ba(g,x.mode,k),m.return=x,x=m),s(x)):n(x,m)}return w}var xi=dg(!0),fg=dg(!1),Zs=fr(null),Js=null,ni=null,Xc=null;function Qc(){Xc=ni=Js=null}function Zc(e){var t=Zs.current;Be(Zs),e._currentValue=t}function Iu(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function ci(e,t){Js=e,Xc=ni=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(It=!0),e.firstContext=null)}function nn(e){var t=e._currentValue;if(Xc!==e)if(e={context:e,memoizedValue:t,next:null},ni===null){if(Js===null)throw Error(se(308));ni=e,Js.dependencies={lanes:0,firstContext:e}}else ni=ni.next=e;return t}var Er=null;function Jc(e){Er===null?Er=[e]:Er.push(e)}function pg(e,t,n,r){var i=t.interleaved;return i===null?(n.next=n,Jc(t)):(n.next=i.next,i.next=n),t.interleaved=n,Pn(e,r)}function Pn(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var Kn=!1;function ed(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function hg(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function On(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function rr(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,$e&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,Pn(e,n)}return i=r.interleaved,i===null?(t.next=t,Jc(r)):(t.next=i.next,i.next=t),r.interleaved=t,Pn(e,n)}function Cs(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Dc(e,n)}}function Kf(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,o=null;if(n=n.firstBaseUpdate,n!==null){do{var s={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};o===null?i=o=s:o=o.next=s,n=n.next}while(n!==null);o===null?i=o=t:o=o.next=t}else i=o=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:o,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function el(e,t,n,r){var i=e.updateQueue;Kn=!1;var o=i.firstBaseUpdate,s=i.lastBaseUpdate,l=i.shared.pending;if(l!==null){i.shared.pending=null;var a=l,u=a.next;a.next=null,s===null?o=u:s.next=u,s=a;var c=e.alternate;c!==null&&(c=c.updateQueue,l=c.lastBaseUpdate,l!==s&&(l===null?c.firstBaseUpdate=u:l.next=u,c.lastBaseUpdate=a))}if(o!==null){var d=i.baseState;s=0,c=u=a=null,l=o;do{var h=l.lane,p=l.eventTime;if((r&h)===h){c!==null&&(c=c.next={eventTime:p,lane:0,tag:l.tag,payload:l.payload,callback:l.callback,next:null});e:{var y=e,v=l;switch(h=t,p=n,v.tag){case 1:if(y=v.payload,typeof y=="function"){d=y.call(p,d,h);break e}d=y;break e;case 3:y.flags=y.flags&-65537|128;case 0:if(y=v.payload,h=typeof y=="function"?y.call(p,d,h):y,h==null)break e;d=Ge({},d,h);break e;case 2:Kn=!0}}l.callback!==null&&l.lane!==0&&(e.flags|=64,h=i.effects,h===null?i.effects=[l]:h.push(l))}else p={eventTime:p,lane:h,tag:l.tag,payload:l.payload,callback:l.callback,next:null},c===null?(u=c=p,a=d):c=c.next=p,s|=h;if(l=l.next,l===null){if(l=i.shared.pending,l===null)break;h=l,l=h.next,h.next=null,i.lastBaseUpdate=h,i.shared.pending=null}}while(!0);if(c===null&&(a=d),i.baseState=a,i.firstBaseUpdate=u,i.lastBaseUpdate=c,t=i.shared.interleaved,t!==null){i=t;do s|=i.lane,i=i.next;while(i!==t)}else o===null&&(i.shared.lanes=0);Or|=s,e.lanes=s,e.memoizedState=d}}function qf(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],i=r.callback;if(i!==null){if(r.callback=null,r=n,typeof i!="function")throw Error(se(191,i));i.call(r)}}}var Fo={},Cn=fr(Fo),So=fr(Fo),Co=fr(Fo);function Sr(e){if(e===Fo)throw Error(se(174));return e}function td(e,t){switch(De(Co,t),De(So,e),De(Cn,Fo),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:du(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=du(t,e)}Be(Cn),De(Cn,t)}function vi(){Be(Cn),Be(So),Be(Co)}function mg(e){Sr(Co.current);var t=Sr(Cn.current),n=du(t,e.type);t!==n&&(De(So,e),De(Cn,n))}function nd(e){So.current===e&&(Be(Cn),Be(So))}var We=fr(0);function tl(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var ga=[];function rd(){for(var e=0;e<ga.length;e++)ga[e]._workInProgressVersionPrimary=null;ga.length=0}var Ns=zn.ReactCurrentDispatcher,ya=zn.ReactCurrentBatchConfig,Ar=0,Ve=null,rt=null,at=null,nl=!1,no=!1,No=0,bk=0;function yt(){throw Error(se(321))}function id(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!yn(e[n],t[n]))return!1;return!0}function od(e,t,n,r,i,o){if(Ar=o,Ve=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Ns.current=e===null||e.memoizedState===null?Nk:jk,e=n(r,i),no){o=0;do{if(no=!1,No=0,25<=o)throw Error(se(301));o+=1,at=rt=null,t.updateQueue=null,Ns.current=_k,e=n(r,i)}while(no)}if(Ns.current=rl,t=rt!==null&&rt.next!==null,Ar=0,at=rt=Ve=null,nl=!1,t)throw Error(se(300));return e}function sd(){var e=No!==0;return No=0,e}function kn(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return at===null?Ve.memoizedState=at=e:at=at.next=e,at}function rn(){if(rt===null){var e=Ve.alternate;e=e!==null?e.memoizedState:null}else e=rt.next;var t=at===null?Ve.memoizedState:at.next;if(t!==null)at=t,rt=e;else{if(e===null)throw Error(se(310));rt=e,e={memoizedState:rt.memoizedState,baseState:rt.baseState,baseQueue:rt.baseQueue,queue:rt.queue,next:null},at===null?Ve.memoizedState=at=e:at=at.next=e}return at}function jo(e,t){return typeof t=="function"?t(e):t}function xa(e){var t=rn(),n=t.queue;if(n===null)throw Error(se(311));n.lastRenderedReducer=e;var r=rt,i=r.baseQueue,o=n.pending;if(o!==null){if(i!==null){var s=i.next;i.next=o.next,o.next=s}r.baseQueue=i=o,n.pending=null}if(i!==null){o=i.next,r=r.baseState;var l=s=null,a=null,u=o;do{var c=u.lane;if((Ar&c)===c)a!==null&&(a=a.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),r=u.hasEagerState?u.eagerState:e(r,u.action);else{var d={lane:c,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};a===null?(l=a=d,s=r):a=a.next=d,Ve.lanes|=c,Or|=c}u=u.next}while(u!==null&&u!==o);a===null?s=r:a.next=l,yn(r,t.memoizedState)||(It=!0),t.memoizedState=r,t.baseState=s,t.baseQueue=a,n.lastRenderedState=r}if(e=n.interleaved,e!==null){i=e;do o=i.lane,Ve.lanes|=o,Or|=o,i=i.next;while(i!==e)}else i===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function va(e){var t=rn(),n=t.queue;if(n===null)throw Error(se(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,o=t.memoizedState;if(i!==null){n.pending=null;var s=i=i.next;do o=e(o,s.action),s=s.next;while(s!==i);yn(o,t.memoizedState)||(It=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function gg(){}function yg(e,t){var n=Ve,r=rn(),i=t(),o=!yn(r.memoizedState,i);if(o&&(r.memoizedState=i,It=!0),r=r.queue,ld(wg.bind(null,n,r,e),[e]),r.getSnapshot!==t||o||at!==null&&at.memoizedState.tag&1){if(n.flags|=2048,_o(9,vg.bind(null,n,r,i,t),void 0,null),ut===null)throw Error(se(349));Ar&30||xg(n,t,i)}return i}function xg(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=Ve.updateQueue,t===null?(t={lastEffect:null,stores:null},Ve.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function vg(e,t,n,r){t.value=n,t.getSnapshot=r,kg(t)&&bg(e)}function wg(e,t,n){return n(function(){kg(t)&&bg(e)})}function kg(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!yn(e,n)}catch{return!0}}function bg(e){var t=Pn(e,1);t!==null&&pn(t,e,1,-1)}function Yf(e){var t=kn();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:jo,lastRenderedState:e},t.queue=e,e=e.dispatch=Ck.bind(null,Ve,e),[t.memoizedState,e]}function _o(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=Ve.updateQueue,t===null?(t={lastEffect:null,stores:null},Ve.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function Eg(){return rn().memoizedState}function js(e,t,n,r){var i=kn();Ve.flags|=e,i.memoizedState=_o(1|t,n,void 0,r===void 0?null:r)}function Tl(e,t,n,r){var i=rn();r=r===void 0?null:r;var o=void 0;if(rt!==null){var s=rt.memoizedState;if(o=s.destroy,r!==null&&id(r,s.deps)){i.memoizedState=_o(t,n,o,r);return}}Ve.flags|=e,i.memoizedState=_o(1|t,n,o,r)}function Xf(e,t){return js(8390656,8,e,t)}function ld(e,t){return Tl(2048,8,e,t)}function Sg(e,t){return Tl(4,2,e,t)}function Cg(e,t){return Tl(4,4,e,t)}function Ng(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function jg(e,t,n){return n=n!=null?n.concat([e]):null,Tl(4,4,Ng.bind(null,t,e),n)}function ad(){}function _g(e,t){var n=rn();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&id(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Tg(e,t){var n=rn();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&id(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function $g(e,t,n){return Ar&21?(yn(n,t)||(n=Rm(),Ve.lanes|=n,Or|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,It=!0),e.memoizedState=n)}function Ek(e,t){var n=Ae;Ae=n!==0&&4>n?n:4,e(!0);var r=ya.transition;ya.transition={};try{e(!1),t()}finally{Ae=n,ya.transition=r}}function Ig(){return rn().memoizedState}function Sk(e,t,n){var r=or(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Lg(e))Ag(t,n);else if(n=pg(e,t,n,r),n!==null){var i=Et();pn(n,e,r,i),Og(n,t,r)}}function Ck(e,t,n){var r=or(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Lg(e))Ag(t,i);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var s=t.lastRenderedState,l=o(s,n);if(i.hasEagerState=!0,i.eagerState=l,yn(l,s)){var a=t.interleaved;a===null?(i.next=i,Jc(t)):(i.next=a.next,a.next=i),t.interleaved=i;return}}catch{}finally{}n=pg(e,t,i,r),n!==null&&(i=Et(),pn(n,e,r,i),Og(n,t,r))}}function Lg(e){var t=e.alternate;return e===Ve||t!==null&&t===Ve}function Ag(e,t){no=nl=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Og(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Dc(e,n)}}var rl={readContext:nn,useCallback:yt,useContext:yt,useEffect:yt,useImperativeHandle:yt,useInsertionEffect:yt,useLayoutEffect:yt,useMemo:yt,useReducer:yt,useRef:yt,useState:yt,useDebugValue:yt,useDeferredValue:yt,useTransition:yt,useMutableSource:yt,useSyncExternalStore:yt,useId:yt,unstable_isNewReconciler:!1},Nk={readContext:nn,useCallback:function(e,t){return kn().memoizedState=[e,t===void 0?null:t],e},useContext:nn,useEffect:Xf,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,js(4194308,4,Ng.bind(null,t,e),n)},useLayoutEffect:function(e,t){return js(4194308,4,e,t)},useInsertionEffect:function(e,t){return js(4,2,e,t)},useMemo:function(e,t){var n=kn();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=kn();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=Sk.bind(null,Ve,e),[r.memoizedState,e]},useRef:function(e){var t=kn();return e={current:e},t.memoizedState=e},useState:Yf,useDebugValue:ad,useDeferredValue:function(e){return kn().memoizedState=e},useTransition:function(){var e=Yf(!1),t=e[0];return e=Ek.bind(null,e[1]),kn().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Ve,i=kn();if(He){if(n===void 0)throw Error(se(407));n=n()}else{if(n=t(),ut===null)throw Error(se(349));Ar&30||xg(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,Xf(wg.bind(null,r,o,e),[e]),r.flags|=2048,_o(9,vg.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=kn(),t=ut.identifierPrefix;if(He){var n=An,r=Ln;n=(r&~(1<<32-fn(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=No++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=bk++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},jk={readContext:nn,useCallback:_g,useContext:nn,useEffect:ld,useImperativeHandle:jg,useInsertionEffect:Sg,useLayoutEffect:Cg,useMemo:Tg,useReducer:xa,useRef:Eg,useState:function(){return xa(jo)},useDebugValue:ad,useDeferredValue:function(e){var t=rn();return $g(t,rt.memoizedState,e)},useTransition:function(){var e=xa(jo)[0],t=rn().memoizedState;return[e,t]},useMutableSource:gg,useSyncExternalStore:yg,useId:Ig,unstable_isNewReconciler:!1},_k={readContext:nn,useCallback:_g,useContext:nn,useEffect:ld,useImperativeHandle:jg,useInsertionEffect:Sg,useLayoutEffect:Cg,useMemo:Tg,useReducer:va,useRef:Eg,useState:function(){return va(jo)},useDebugValue:ad,useDeferredValue:function(e){var t=rn();return rt===null?t.memoizedState=e:$g(t,rt.memoizedState,e)},useTransition:function(){var e=va(jo)[0],t=rn().memoizedState;return[e,t]},useMutableSource:gg,useSyncExternalStore:yg,useId:Ig,unstable_isNewReconciler:!1};function ln(e,t){if(e&&e.defaultProps){t=Ge({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function Lu(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:Ge({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var $l={isMounted:function(e){return(e=e._reactInternals)?zr(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Et(),i=or(e),o=On(r,i);o.payload=t,n!=null&&(o.callback=n),t=rr(e,o,i),t!==null&&(pn(t,e,i,r),Cs(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Et(),i=or(e),o=On(r,i);o.tag=1,o.payload=t,n!=null&&(o.callback=n),t=rr(e,o,i),t!==null&&(pn(t,e,i,r),Cs(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Et(),r=or(e),i=On(n,r);i.tag=2,t!=null&&(i.callback=t),t=rr(e,i,r),t!==null&&(pn(t,e,r,n),Cs(t,e,r))}};function Qf(e,t,n,r,i,o,s){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,o,s):t.prototype&&t.prototype.isPureReactComponent?!wo(n,r)||!wo(i,o):!0}function Rg(e,t,n){var r=!1,i=ar,o=t.contextType;return typeof o=="object"&&o!==null?o=nn(o):(i=At(t)?Ir:wt.current,r=t.contextTypes,o=(r=r!=null)?gi(e,i):ar),t=new t(n,o),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=$l,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=o),t}function Zf(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&$l.enqueueReplaceState(t,t.state,null)}function Au(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs={},ed(e);var o=t.contextType;typeof o=="object"&&o!==null?i.context=nn(o):(o=At(t)?Ir:wt.current,i.context=gi(e,o)),i.state=e.memoizedState,o=t.getDerivedStateFromProps,typeof o=="function"&&(Lu(e,t,o,n),i.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(t=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),t!==i.state&&$l.enqueueReplaceState(i,i.state,null),el(e,n,i,r),i.state=e.memoizedState),typeof i.componentDidMount=="function"&&(e.flags|=4194308)}function wi(e,t){try{var n="",r=t;do n+=nw(r),r=r.return;while(r);var i=n}catch(o){i=`
|
|
39
|
+
Error generating stack: `+o.message+`
|
|
40
|
+
`+o.stack}return{value:e,source:t,stack:i,digest:null}}function wa(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function Ou(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var Tk=typeof WeakMap=="function"?WeakMap:Map;function Mg(e,t,n){n=On(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){ol||(ol=!0,Wu=r),Ou(e,t)},n}function Pg(e,t,n){n=On(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){Ou(e,t)}}var o=e.stateNode;return o!==null&&typeof o.componentDidCatch=="function"&&(n.callback=function(){Ou(e,t),typeof r!="function"&&(ir===null?ir=new Set([this]):ir.add(this));var s=t.stack;this.componentDidCatch(t.value,{componentStack:s!==null?s:""})}),n}function Jf(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Tk;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(i.add(n),e=Hk.bind(null,e,t,n),t.then(e,e))}function ep(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function tp(e,t,n,r,i){return e.mode&1?(e.flags|=65536,e.lanes=i,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=On(-1,1),t.tag=2,rr(n,t,1))),n.lanes|=1),e)}var $k=zn.ReactCurrentOwner,It=!1;function bt(e,t,n,r){t.child=e===null?fg(t,null,n,r):xi(t,e.child,n,r)}function np(e,t,n,r,i){n=n.render;var o=t.ref;return ci(t,i),r=od(e,t,n,r,o,i),n=sd(),e!==null&&!It?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Fn(e,t,i)):(He&&n&&Kc(t),t.flags|=1,bt(e,t,r,i),t.child)}function rp(e,t,n,r,i){if(e===null){var o=n.type;return typeof o=="function"&&!gd(o)&&o.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=o,Fg(e,t,o,r,i)):(e=Is(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(o=e.child,!(e.lanes&i)){var s=o.memoizedProps;if(n=n.compare,n=n!==null?n:wo,n(s,r)&&e.ref===t.ref)return Fn(e,t,i)}return t.flags|=1,e=sr(o,r),e.ref=t.ref,e.return=t,t.child=e}function Fg(e,t,n,r,i){if(e!==null){var o=e.memoizedProps;if(wo(o,r)&&e.ref===t.ref)if(It=!1,t.pendingProps=r=o,(e.lanes&i)!==0)e.flags&131072&&(It=!0);else return t.lanes=e.lanes,Fn(e,t,i)}return Ru(e,t,n,r,i)}function Dg(e,t,n){var r=t.pendingProps,i=r.children,o=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},De(ii,zt),zt|=n;else{if(!(n&1073741824))return e=o!==null?o.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,De(ii,zt),zt|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=o!==null?o.baseLanes:n,De(ii,zt),zt|=r}else o!==null?(r=o.baseLanes|n,t.memoizedState=null):r=n,De(ii,zt),zt|=r;return bt(e,t,i,n),t.child}function zg(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Ru(e,t,n,r,i){var o=At(n)?Ir:wt.current;return o=gi(t,o),ci(t,i),n=od(e,t,n,r,o,i),r=sd(),e!==null&&!It?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Fn(e,t,i)):(He&&r&&Kc(t),t.flags|=1,bt(e,t,n,i),t.child)}function ip(e,t,n,r,i){if(At(n)){var o=!0;Ys(t)}else o=!1;if(ci(t,i),t.stateNode===null)_s(e,t),Rg(t,n,r),Au(t,n,r,i),r=!0;else if(e===null){var s=t.stateNode,l=t.memoizedProps;s.props=l;var a=s.context,u=n.contextType;typeof u=="object"&&u!==null?u=nn(u):(u=At(n)?Ir:wt.current,u=gi(t,u));var c=n.getDerivedStateFromProps,d=typeof c=="function"||typeof s.getSnapshotBeforeUpdate=="function";d||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(l!==r||a!==u)&&Zf(t,s,r,u),Kn=!1;var h=t.memoizedState;s.state=h,el(t,r,s,i),a=t.memoizedState,l!==r||h!==a||Lt.current||Kn?(typeof c=="function"&&(Lu(t,n,c,r),a=t.memoizedState),(l=Kn||Qf(t,n,l,r,h,a,u))?(d||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount()),typeof s.componentDidMount=="function"&&(t.flags|=4194308)):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=a),s.props=r,s.state=a,s.context=u,r=l):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{s=t.stateNode,hg(e,t),l=t.memoizedProps,u=t.type===t.elementType?l:ln(t.type,l),s.props=u,d=t.pendingProps,h=s.context,a=n.contextType,typeof a=="object"&&a!==null?a=nn(a):(a=At(n)?Ir:wt.current,a=gi(t,a));var p=n.getDerivedStateFromProps;(c=typeof p=="function"||typeof s.getSnapshotBeforeUpdate=="function")||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(l!==d||h!==a)&&Zf(t,s,r,a),Kn=!1,h=t.memoizedState,s.state=h,el(t,r,s,i);var y=t.memoizedState;l!==d||h!==y||Lt.current||Kn?(typeof p=="function"&&(Lu(t,n,p,r),y=t.memoizedState),(u=Kn||Qf(t,n,u,r,h,y,a)||!1)?(c||typeof s.UNSAFE_componentWillUpdate!="function"&&typeof s.componentWillUpdate!="function"||(typeof s.componentWillUpdate=="function"&&s.componentWillUpdate(r,y,a),typeof s.UNSAFE_componentWillUpdate=="function"&&s.UNSAFE_componentWillUpdate(r,y,a)),typeof s.componentDidUpdate=="function"&&(t.flags|=4),typeof s.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof s.componentDidUpdate!="function"||l===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=y),s.props=r,s.state=y,s.context=a,r=u):(typeof s.componentDidUpdate!="function"||l===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),r=!1)}return Mu(e,t,n,r,o,i)}function Mu(e,t,n,r,i,o){zg(e,t);var s=(t.flags&128)!==0;if(!r&&!s)return i&&Hf(t,n,!1),Fn(e,t,o);r=t.stateNode,$k.current=t;var l=s&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&s?(t.child=xi(t,e.child,null,o),t.child=xi(t,null,l,o)):bt(e,t,l,o),t.memoizedState=r.state,i&&Hf(t,n,!0),t.child}function Bg(e){var t=e.stateNode;t.pendingContext?Uf(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Uf(e,t.context,!1),td(e,t.containerInfo)}function op(e,t,n,r,i){return yi(),Yc(i),t.flags|=256,bt(e,t,n,r),t.child}var Pu={dehydrated:null,treeContext:null,retryLane:0};function Fu(e){return{baseLanes:e,cachePool:null,transitions:null}}function Ug(e,t,n){var r=t.pendingProps,i=We.current,o=!1,s=(t.flags&128)!==0,l;if((l=s)||(l=e!==null&&e.memoizedState===null?!1:(i&2)!==0),l?(o=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(i|=1),De(We,i&1),e===null)return $u(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(s=r.children,e=r.fallback,o?(r=t.mode,o=t.child,s={mode:"hidden",children:s},!(r&1)&&o!==null?(o.childLanes=0,o.pendingProps=s):o=Al(s,r,0,null),e=jr(e,r,n,null),o.return=t,e.return=t,o.sibling=e,t.child=o,t.child.memoizedState=Fu(n),t.memoizedState=Pu,e):ud(t,s));if(i=e.memoizedState,i!==null&&(l=i.dehydrated,l!==null))return Ik(e,t,s,r,l,i,n);if(o){o=r.fallback,s=t.mode,i=e.child,l=i.sibling;var a={mode:"hidden",children:r.children};return!(s&1)&&t.child!==i?(r=t.child,r.childLanes=0,r.pendingProps=a,t.deletions=null):(r=sr(i,a),r.subtreeFlags=i.subtreeFlags&14680064),l!==null?o=sr(l,o):(o=jr(o,s,n,null),o.flags|=2),o.return=t,r.return=t,r.sibling=o,t.child=r,r=o,o=t.child,s=e.child.memoizedState,s=s===null?Fu(n):{baseLanes:s.baseLanes|n,cachePool:null,transitions:s.transitions},o.memoizedState=s,o.childLanes=e.childLanes&~n,t.memoizedState=Pu,r}return o=e.child,e=o.sibling,r=sr(o,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function ud(e,t){return t=Al({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function os(e,t,n,r){return r!==null&&Yc(r),xi(t,e.child,null,n),e=ud(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Ik(e,t,n,r,i,o,s){if(n)return t.flags&256?(t.flags&=-257,r=wa(Error(se(422))),os(e,t,s,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(o=r.fallback,i=t.mode,r=Al({mode:"visible",children:r.children},i,0,null),o=jr(o,i,s,null),o.flags|=2,r.return=t,o.return=t,r.sibling=o,t.child=r,t.mode&1&&xi(t,e.child,null,s),t.child.memoizedState=Fu(s),t.memoizedState=Pu,o);if(!(t.mode&1))return os(e,t,s,null);if(i.data==="$!"){if(r=i.nextSibling&&i.nextSibling.dataset,r)var l=r.dgst;return r=l,o=Error(se(419)),r=wa(o,r,void 0),os(e,t,s,r)}if(l=(s&e.childLanes)!==0,It||l){if(r=ut,r!==null){switch(s&-s){case 4:i=2;break;case 16:i=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}i=i&(r.suspendedLanes|s)?0:i,i!==0&&i!==o.retryLane&&(o.retryLane=i,Pn(e,i),pn(r,e,i,-1))}return md(),r=wa(Error(se(421))),os(e,t,s,r)}return i.data==="$?"?(t.flags|=128,t.child=e.child,t=Wk.bind(null,e),i._reactRetry=t,null):(e=o.treeContext,Bt=nr(i.nextSibling),Ut=t,He=!0,cn=null,e!==null&&(Qt[Zt++]=Ln,Qt[Zt++]=An,Qt[Zt++]=Lr,Ln=e.id,An=e.overflow,Lr=t),t=ud(t,r.children),t.flags|=4096,t)}function sp(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Iu(e.return,t,n)}function ka(e,t,n,r,i){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i)}function Hg(e,t,n){var r=t.pendingProps,i=r.revealOrder,o=r.tail;if(bt(e,t,r.children,n),r=We.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&sp(e,n,t);else if(e.tag===19)sp(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(De(We,r),!(t.mode&1))t.memoizedState=null;else switch(i){case"forwards":for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&tl(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),ka(t,!1,i,n,o);break;case"backwards":for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&tl(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}ka(t,!0,n,null,o);break;case"together":ka(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function _s(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Fn(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Or|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(se(153));if(t.child!==null){for(e=t.child,n=sr(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=sr(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Lk(e,t,n){switch(t.tag){case 3:Bg(t),yi();break;case 5:mg(t);break;case 1:At(t.type)&&Ys(t);break;case 4:td(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;De(Zs,r._currentValue),r._currentValue=i;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(De(We,We.current&1),t.flags|=128,null):n&t.child.childLanes?Ug(e,t,n):(De(We,We.current&1),e=Fn(e,t,n),e!==null?e.sibling:null);De(We,We.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return Hg(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),De(We,We.current),r)break;return null;case 22:case 23:return t.lanes=0,Dg(e,t,n)}return Fn(e,t,n)}var Wg,Du,Vg,Gg;Wg=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};Du=function(){};Vg=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,Sr(Cn.current);var o=null;switch(n){case"input":i=lu(e,i),r=lu(e,r),o=[];break;case"select":i=Ge({},i,{value:void 0}),r=Ge({},r,{value:void 0}),o=[];break;case"textarea":i=cu(e,i),r=cu(e,r),o=[];break;default:typeof i.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=Ks)}fu(n,r);var s;n=null;for(u in i)if(!r.hasOwnProperty(u)&&i.hasOwnProperty(u)&&i[u]!=null)if(u==="style"){var l=i[u];for(s in l)l.hasOwnProperty(s)&&(n||(n={}),n[s]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(po.hasOwnProperty(u)?o||(o=[]):(o=o||[]).push(u,null));for(u in r){var a=r[u];if(l=i!=null?i[u]:void 0,r.hasOwnProperty(u)&&a!==l&&(a!=null||l!=null))if(u==="style")if(l){for(s in l)!l.hasOwnProperty(s)||a&&a.hasOwnProperty(s)||(n||(n={}),n[s]="");for(s in a)a.hasOwnProperty(s)&&l[s]!==a[s]&&(n||(n={}),n[s]=a[s])}else n||(o||(o=[]),o.push(u,n)),n=a;else u==="dangerouslySetInnerHTML"?(a=a?a.__html:void 0,l=l?l.__html:void 0,a!=null&&l!==a&&(o=o||[]).push(u,a)):u==="children"?typeof a!="string"&&typeof a!="number"||(o=o||[]).push(u,""+a):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(po.hasOwnProperty(u)?(a!=null&&u==="onScroll"&&ze("scroll",e),o||l===a||(o=[])):(o=o||[]).push(u,a))}n&&(o=o||[]).push("style",n);var u=o;(t.updateQueue=u)&&(t.flags|=4)}};Gg=function(e,t,n,r){n!==r&&(t.flags|=4)};function Fi(e,t){if(!He)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function xt(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&14680064,r|=i.flags&14680064,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Ak(e,t,n){var r=t.pendingProps;switch(qc(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return xt(t),null;case 1:return At(t.type)&&qs(),xt(t),null;case 3:return r=t.stateNode,vi(),Be(Lt),Be(wt),rd(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(rs(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,cn!==null&&(Ku(cn),cn=null))),Du(e,t),xt(t),null;case 5:nd(t);var i=Sr(Co.current);if(n=t.type,e!==null&&t.stateNode!=null)Vg(e,t,n,r,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(se(166));return xt(t),null}if(e=Sr(Cn.current),rs(t)){r=t.stateNode,n=t.type;var o=t.memoizedProps;switch(r[En]=t,r[Eo]=o,e=(t.mode&1)!==0,n){case"dialog":ze("cancel",r),ze("close",r);break;case"iframe":case"object":case"embed":ze("load",r);break;case"video":case"audio":for(i=0;i<Yi.length;i++)ze(Yi[i],r);break;case"source":ze("error",r);break;case"img":case"image":case"link":ze("error",r),ze("load",r);break;case"details":ze("toggle",r);break;case"input":mf(r,o),ze("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!o.multiple},ze("invalid",r);break;case"textarea":yf(r,o),ze("invalid",r)}fu(n,o),i=null;for(var s in o)if(o.hasOwnProperty(s)){var l=o[s];s==="children"?typeof l=="string"?r.textContent!==l&&(o.suppressHydrationWarning!==!0&&ns(r.textContent,l,e),i=["children",l]):typeof l=="number"&&r.textContent!==""+l&&(o.suppressHydrationWarning!==!0&&ns(r.textContent,l,e),i=["children",""+l]):po.hasOwnProperty(s)&&l!=null&&s==="onScroll"&&ze("scroll",r)}switch(n){case"input":qo(r),gf(r,o,!0);break;case"textarea":qo(r),xf(r);break;case"select":case"option":break;default:typeof o.onClick=="function"&&(r.onclick=Ks)}r=i,t.updateQueue=r,r!==null&&(t.flags|=4)}else{s=i.nodeType===9?i:i.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=wm(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=s.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=s.createElement(n,{is:r.is}):(e=s.createElement(n),n==="select"&&(s=e,r.multiple?s.multiple=!0:r.size&&(s.size=r.size))):e=s.createElementNS(e,n),e[En]=t,e[Eo]=r,Wg(e,t,!1,!1),t.stateNode=e;e:{switch(s=pu(n,r),n){case"dialog":ze("cancel",e),ze("close",e),i=r;break;case"iframe":case"object":case"embed":ze("load",e),i=r;break;case"video":case"audio":for(i=0;i<Yi.length;i++)ze(Yi[i],e);i=r;break;case"source":ze("error",e),i=r;break;case"img":case"image":case"link":ze("error",e),ze("load",e),i=r;break;case"details":ze("toggle",e),i=r;break;case"input":mf(e,r),i=lu(e,r),ze("invalid",e);break;case"option":i=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},i=Ge({},r,{value:void 0}),ze("invalid",e);break;case"textarea":yf(e,r),i=cu(e,r),ze("invalid",e);break;default:i=r}fu(n,i),l=i;for(o in l)if(l.hasOwnProperty(o)){var a=l[o];o==="style"?Em(e,a):o==="dangerouslySetInnerHTML"?(a=a?a.__html:void 0,a!=null&&km(e,a)):o==="children"?typeof a=="string"?(n!=="textarea"||a!=="")&&ho(e,a):typeof a=="number"&&ho(e,""+a):o!=="suppressContentEditableWarning"&&o!=="suppressHydrationWarning"&&o!=="autoFocus"&&(po.hasOwnProperty(o)?a!=null&&o==="onScroll"&&ze("scroll",e):a!=null&&Ac(e,o,a,s))}switch(n){case"input":qo(e),gf(e,r,!1);break;case"textarea":qo(e),xf(e);break;case"option":r.value!=null&&e.setAttribute("value",""+lr(r.value));break;case"select":e.multiple=!!r.multiple,o=r.value,o!=null?si(e,!!r.multiple,o,!1):r.defaultValue!=null&&si(e,!!r.multiple,r.defaultValue,!0);break;default:typeof i.onClick=="function"&&(e.onclick=Ks)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return xt(t),null;case 6:if(e&&t.stateNode!=null)Gg(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(se(166));if(n=Sr(Co.current),Sr(Cn.current),rs(t)){if(r=t.stateNode,n=t.memoizedProps,r[En]=t,(o=r.nodeValue!==n)&&(e=Ut,e!==null))switch(e.tag){case 3:ns(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&ns(r.nodeValue,n,(e.mode&1)!==0)}o&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[En]=t,t.stateNode=r}return xt(t),null;case 13:if(Be(We),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(He&&Bt!==null&&t.mode&1&&!(t.flags&128))cg(),yi(),t.flags|=98560,o=!1;else if(o=rs(t),r!==null&&r.dehydrated!==null){if(e===null){if(!o)throw Error(se(318));if(o=t.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(se(317));o[En]=t}else yi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;xt(t),o=!1}else cn!==null&&(Ku(cn),cn=null),o=!0;if(!o)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||We.current&1?it===0&&(it=3):md())),t.updateQueue!==null&&(t.flags|=4),xt(t),null);case 4:return vi(),Du(e,t),e===null&&ko(t.stateNode.containerInfo),xt(t),null;case 10:return Zc(t.type._context),xt(t),null;case 17:return At(t.type)&&qs(),xt(t),null;case 19:if(Be(We),o=t.memoizedState,o===null)return xt(t),null;if(r=(t.flags&128)!==0,s=o.rendering,s===null)if(r)Fi(o,!1);else{if(it!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(s=tl(e),s!==null){for(t.flags|=128,Fi(o,!1),r=s.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)o=n,e=r,o.flags&=14680066,s=o.alternate,s===null?(o.childLanes=0,o.lanes=e,o.child=null,o.subtreeFlags=0,o.memoizedProps=null,o.memoizedState=null,o.updateQueue=null,o.dependencies=null,o.stateNode=null):(o.childLanes=s.childLanes,o.lanes=s.lanes,o.child=s.child,o.subtreeFlags=0,o.deletions=null,o.memoizedProps=s.memoizedProps,o.memoizedState=s.memoizedState,o.updateQueue=s.updateQueue,o.type=s.type,e=s.dependencies,o.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return De(We,We.current&1|2),t.child}e=e.sibling}o.tail!==null&&Ye()>ki&&(t.flags|=128,r=!0,Fi(o,!1),t.lanes=4194304)}else{if(!r)if(e=tl(s),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Fi(o,!0),o.tail===null&&o.tailMode==="hidden"&&!s.alternate&&!He)return xt(t),null}else 2*Ye()-o.renderingStartTime>ki&&n!==1073741824&&(t.flags|=128,r=!0,Fi(o,!1),t.lanes=4194304);o.isBackwards?(s.sibling=t.child,t.child=s):(n=o.last,n!==null?n.sibling=s:t.child=s,o.last=s)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=Ye(),t.sibling=null,n=We.current,De(We,r?n&1|2:n&1),t):(xt(t),null);case 22:case 23:return hd(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?zt&1073741824&&(xt(t),t.subtreeFlags&6&&(t.flags|=8192)):xt(t),null;case 24:return null;case 25:return null}throw Error(se(156,t.tag))}function Ok(e,t){switch(qc(t),t.tag){case 1:return At(t.type)&&qs(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return vi(),Be(Lt),Be(wt),rd(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return nd(t),null;case 13:if(Be(We),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(se(340));yi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Be(We),null;case 4:return vi(),null;case 10:return Zc(t.type._context),null;case 22:case 23:return hd(),null;case 24:return null;default:return null}}var ss=!1,vt=!1,Rk=typeof WeakSet=="function"?WeakSet:Set,fe=null;function ri(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){qe(e,t,r)}else n.current=null}function zu(e,t,n){try{n()}catch(r){qe(e,t,r)}}var lp=!1;function Mk(e,t){if(Eu=Ws,e=Qm(),Gc(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var s=0,l=-1,a=-1,u=0,c=0,d=e,h=null;t:for(;;){for(var p;d!==n||i!==0&&d.nodeType!==3||(l=s+i),d!==o||r!==0&&d.nodeType!==3||(a=s+r),d.nodeType===3&&(s+=d.nodeValue.length),(p=d.firstChild)!==null;)h=d,d=p;for(;;){if(d===e)break t;if(h===n&&++u===i&&(l=s),h===o&&++c===r&&(a=s),(p=d.nextSibling)!==null)break;d=h,h=d.parentNode}d=p}n=l===-1||a===-1?null:{start:l,end:a}}else n=null}n=n||{start:0,end:0}}else n=null;for(Su={focusedElem:e,selectionRange:n},Ws=!1,fe=t;fe!==null;)if(t=fe,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,fe=e;else for(;fe!==null;){t=fe;try{var y=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(y!==null){var v=y.memoizedProps,w=y.memoizedState,x=t.stateNode,m=x.getSnapshotBeforeUpdate(t.elementType===t.type?v:ln(t.type,v),w);x.__reactInternalSnapshotBeforeUpdate=m}break;case 3:var g=t.stateNode.containerInfo;g.nodeType===1?g.textContent="":g.nodeType===9&&g.documentElement&&g.removeChild(g.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(se(163))}}catch(k){qe(t,t.return,k)}if(e=t.sibling,e!==null){e.return=t.return,fe=e;break}fe=t.return}return y=lp,lp=!1,y}function ro(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var o=i.destroy;i.destroy=void 0,o!==void 0&&zu(t,n,o)}i=i.next}while(i!==r)}}function Il(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function Bu(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function Kg(e){var t=e.alternate;t!==null&&(e.alternate=null,Kg(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[En],delete t[Eo],delete t[ju],delete t[xk],delete t[vk])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function qg(e){return e.tag===5||e.tag===3||e.tag===4}function ap(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||qg(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Uu(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Ks));else if(r!==4&&(e=e.child,e!==null))for(Uu(e,t,n),e=e.sibling;e!==null;)Uu(e,t,n),e=e.sibling}function Hu(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(Hu(e,t,n),e=e.sibling;e!==null;)Hu(e,t,n),e=e.sibling}var dt=null,an=!1;function Wn(e,t,n){for(n=n.child;n!==null;)Yg(e,t,n),n=n.sibling}function Yg(e,t,n){if(Sn&&typeof Sn.onCommitFiberUnmount=="function")try{Sn.onCommitFiberUnmount(El,n)}catch{}switch(n.tag){case 5:vt||ri(n,t);case 6:var r=dt,i=an;dt=null,Wn(e,t,n),dt=r,an=i,dt!==null&&(an?(e=dt,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):dt.removeChild(n.stateNode));break;case 18:dt!==null&&(an?(e=dt,n=n.stateNode,e.nodeType===8?ha(e.parentNode,n):e.nodeType===1&&ha(e,n),xo(e)):ha(dt,n.stateNode));break;case 4:r=dt,i=an,dt=n.stateNode.containerInfo,an=!0,Wn(e,t,n),dt=r,an=i;break;case 0:case 11:case 14:case 15:if(!vt&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var o=i,s=o.destroy;o=o.tag,s!==void 0&&(o&2||o&4)&&zu(n,t,s),i=i.next}while(i!==r)}Wn(e,t,n);break;case 1:if(!vt&&(ri(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(l){qe(n,t,l)}Wn(e,t,n);break;case 21:Wn(e,t,n);break;case 22:n.mode&1?(vt=(r=vt)||n.memoizedState!==null,Wn(e,t,n),vt=r):Wn(e,t,n);break;default:Wn(e,t,n)}}function up(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new Rk),t.forEach(function(r){var i=Vk.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function sn(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];try{var o=e,s=t,l=s;e:for(;l!==null;){switch(l.tag){case 5:dt=l.stateNode,an=!1;break e;case 3:dt=l.stateNode.containerInfo,an=!0;break e;case 4:dt=l.stateNode.containerInfo,an=!0;break e}l=l.return}if(dt===null)throw Error(se(160));Yg(o,s,i),dt=null,an=!1;var a=i.alternate;a!==null&&(a.return=null),i.return=null}catch(u){qe(i,t,u)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)Xg(t,e),t=t.sibling}function Xg(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(sn(t,e),wn(e),r&4){try{ro(3,e,e.return),Il(3,e)}catch(v){qe(e,e.return,v)}try{ro(5,e,e.return)}catch(v){qe(e,e.return,v)}}break;case 1:sn(t,e),wn(e),r&512&&n!==null&&ri(n,n.return);break;case 5:if(sn(t,e),wn(e),r&512&&n!==null&&ri(n,n.return),e.flags&32){var i=e.stateNode;try{ho(i,"")}catch(v){qe(e,e.return,v)}}if(r&4&&(i=e.stateNode,i!=null)){var o=e.memoizedProps,s=n!==null?n.memoizedProps:o,l=e.type,a=e.updateQueue;if(e.updateQueue=null,a!==null)try{l==="input"&&o.type==="radio"&&o.name!=null&&xm(i,o),pu(l,s);var u=pu(l,o);for(s=0;s<a.length;s+=2){var c=a[s],d=a[s+1];c==="style"?Em(i,d):c==="dangerouslySetInnerHTML"?km(i,d):c==="children"?ho(i,d):Ac(i,c,d,u)}switch(l){case"input":au(i,o);break;case"textarea":vm(i,o);break;case"select":var h=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!o.multiple;var p=o.value;p!=null?si(i,!!o.multiple,p,!1):h!==!!o.multiple&&(o.defaultValue!=null?si(i,!!o.multiple,o.defaultValue,!0):si(i,!!o.multiple,o.multiple?[]:"",!1))}i[Eo]=o}catch(v){qe(e,e.return,v)}}break;case 6:if(sn(t,e),wn(e),r&4){if(e.stateNode===null)throw Error(se(162));i=e.stateNode,o=e.memoizedProps;try{i.nodeValue=o}catch(v){qe(e,e.return,v)}}break;case 3:if(sn(t,e),wn(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{xo(t.containerInfo)}catch(v){qe(e,e.return,v)}break;case 4:sn(t,e),wn(e);break;case 13:sn(t,e),wn(e),i=e.child,i.flags&8192&&(o=i.memoizedState!==null,i.stateNode.isHidden=o,!o||i.alternate!==null&&i.alternate.memoizedState!==null||(fd=Ye())),r&4&&up(e);break;case 22:if(c=n!==null&&n.memoizedState!==null,e.mode&1?(vt=(u=vt)||c,sn(t,e),vt=u):sn(t,e),wn(e),r&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!c&&e.mode&1)for(fe=e,c=e.child;c!==null;){for(d=fe=c;fe!==null;){switch(h=fe,p=h.child,h.tag){case 0:case 11:case 14:case 15:ro(4,h,h.return);break;case 1:ri(h,h.return);var y=h.stateNode;if(typeof y.componentWillUnmount=="function"){r=h,n=h.return;try{t=r,y.props=t.memoizedProps,y.state=t.memoizedState,y.componentWillUnmount()}catch(v){qe(r,n,v)}}break;case 5:ri(h,h.return);break;case 22:if(h.memoizedState!==null){dp(d);continue}}p!==null?(p.return=h,fe=p):dp(d)}c=c.sibling}e:for(c=null,d=e;;){if(d.tag===5){if(c===null){c=d;try{i=d.stateNode,u?(o=i.style,typeof o.setProperty=="function"?o.setProperty("display","none","important"):o.display="none"):(l=d.stateNode,a=d.memoizedProps.style,s=a!=null&&a.hasOwnProperty("display")?a.display:null,l.style.display=bm("display",s))}catch(v){qe(e,e.return,v)}}}else if(d.tag===6){if(c===null)try{d.stateNode.nodeValue=u?"":d.memoizedProps}catch(v){qe(e,e.return,v)}}else if((d.tag!==22&&d.tag!==23||d.memoizedState===null||d===e)&&d.child!==null){d.child.return=d,d=d.child;continue}if(d===e)break e;for(;d.sibling===null;){if(d.return===null||d.return===e)break e;c===d&&(c=null),d=d.return}c===d&&(c=null),d.sibling.return=d.return,d=d.sibling}}break;case 19:sn(t,e),wn(e),r&4&&up(e);break;case 21:break;default:sn(t,e),wn(e)}}function wn(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(qg(n)){var r=n;break e}n=n.return}throw Error(se(160))}switch(r.tag){case 5:var i=r.stateNode;r.flags&32&&(ho(i,""),r.flags&=-33);var o=ap(e);Hu(e,o,i);break;case 3:case 4:var s=r.stateNode.containerInfo,l=ap(e);Uu(e,l,s);break;default:throw Error(se(161))}}catch(a){qe(e,e.return,a)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Pk(e,t,n){fe=e,Qg(e)}function Qg(e,t,n){for(var r=(e.mode&1)!==0;fe!==null;){var i=fe,o=i.child;if(i.tag===22&&r){var s=i.memoizedState!==null||ss;if(!s){var l=i.alternate,a=l!==null&&l.memoizedState!==null||vt;l=ss;var u=vt;if(ss=s,(vt=a)&&!u)for(fe=i;fe!==null;)s=fe,a=s.child,s.tag===22&&s.memoizedState!==null?fp(i):a!==null?(a.return=s,fe=a):fp(i);for(;o!==null;)fe=o,Qg(o),o=o.sibling;fe=i,ss=l,vt=u}cp(e)}else i.subtreeFlags&8772&&o!==null?(o.return=i,fe=o):cp(e)}}function cp(e){for(;fe!==null;){var t=fe;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:vt||Il(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!vt)if(n===null)r.componentDidMount();else{var i=t.elementType===t.type?n.memoizedProps:ln(t.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var o=t.updateQueue;o!==null&&qf(t,o,r);break;case 3:var s=t.updateQueue;if(s!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}qf(t,s,n)}break;case 5:var l=t.stateNode;if(n===null&&t.flags&4){n=l;var a=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":a.autoFocus&&n.focus();break;case"img":a.src&&(n.src=a.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var u=t.alternate;if(u!==null){var c=u.memoizedState;if(c!==null){var d=c.dehydrated;d!==null&&xo(d)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(se(163))}vt||t.flags&512&&Bu(t)}catch(h){qe(t,t.return,h)}}if(t===e){fe=null;break}if(n=t.sibling,n!==null){n.return=t.return,fe=n;break}fe=t.return}}function dp(e){for(;fe!==null;){var t=fe;if(t===e){fe=null;break}var n=t.sibling;if(n!==null){n.return=t.return,fe=n;break}fe=t.return}}function fp(e){for(;fe!==null;){var t=fe;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{Il(4,t)}catch(a){qe(t,n,a)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var i=t.return;try{r.componentDidMount()}catch(a){qe(t,i,a)}}var o=t.return;try{Bu(t)}catch(a){qe(t,o,a)}break;case 5:var s=t.return;try{Bu(t)}catch(a){qe(t,s,a)}}}catch(a){qe(t,t.return,a)}if(t===e){fe=null;break}var l=t.sibling;if(l!==null){l.return=t.return,fe=l;break}fe=t.return}}var Fk=Math.ceil,il=zn.ReactCurrentDispatcher,cd=zn.ReactCurrentOwner,tn=zn.ReactCurrentBatchConfig,$e=0,ut=null,et=null,mt=0,zt=0,ii=fr(0),it=0,To=null,Or=0,Ll=0,dd=0,io=null,$t=null,fd=0,ki=1/0,$n=null,ol=!1,Wu=null,ir=null,ls=!1,Zn=null,sl=0,oo=0,Vu=null,Ts=-1,$s=0;function Et(){return $e&6?Ye():Ts!==-1?Ts:Ts=Ye()}function or(e){return e.mode&1?$e&2&&mt!==0?mt&-mt:kk.transition!==null?($s===0&&($s=Rm()),$s):(e=Ae,e!==0||(e=window.event,e=e===void 0?16:Um(e.type)),e):1}function pn(e,t,n,r){if(50<oo)throw oo=0,Vu=null,Error(se(185));Ro(e,n,r),(!($e&2)||e!==ut)&&(e===ut&&(!($e&2)&&(Ll|=n),it===4&&Yn(e,mt)),Ot(e,r),n===1&&$e===0&&!(t.mode&1)&&(ki=Ye()+500,_l&&pr()))}function Ot(e,t){var n=e.callbackNode;kw(e,t);var r=Hs(e,e===ut?mt:0);if(r===0)n!==null&&kf(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&kf(n),t===1)e.tag===0?wk(pp.bind(null,e)):lg(pp.bind(null,e)),gk(function(){!($e&6)&&pr()}),n=null;else{switch(Mm(r)){case 1:n=Fc;break;case 4:n=Am;break;case 16:n=Us;break;case 536870912:n=Om;break;default:n=Us}n=oy(n,Zg.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function Zg(e,t){if(Ts=-1,$s=0,$e&6)throw Error(se(327));var n=e.callbackNode;if(di()&&e.callbackNode!==n)return null;var r=Hs(e,e===ut?mt:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=ll(e,r);else{t=r;var i=$e;$e|=2;var o=ey();(ut!==e||mt!==t)&&($n=null,ki=Ye()+500,Nr(e,t));do try{Bk();break}catch(l){Jg(e,l)}while(!0);Qc(),il.current=o,$e=i,et!==null?t=0:(ut=null,mt=0,t=it)}if(t!==0){if(t===2&&(i=xu(e),i!==0&&(r=i,t=Gu(e,i))),t===1)throw n=To,Nr(e,0),Yn(e,r),Ot(e,Ye()),n;if(t===6)Yn(e,r);else{if(i=e.current.alternate,!(r&30)&&!Dk(i)&&(t=ll(e,r),t===2&&(o=xu(e),o!==0&&(r=o,t=Gu(e,o))),t===1))throw n=To,Nr(e,0),Yn(e,r),Ot(e,Ye()),n;switch(e.finishedWork=i,e.finishedLanes=r,t){case 0:case 1:throw Error(se(345));case 2:vr(e,$t,$n);break;case 3:if(Yn(e,r),(r&130023424)===r&&(t=fd+500-Ye(),10<t)){if(Hs(e,0)!==0)break;if(i=e.suspendedLanes,(i&r)!==r){Et(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=Nu(vr.bind(null,e,$t,$n),t);break}vr(e,$t,$n);break;case 4:if(Yn(e,r),(r&4194240)===r)break;for(t=e.eventTimes,i=-1;0<r;){var s=31-fn(r);o=1<<s,s=t[s],s>i&&(i=s),r&=~o}if(r=i,r=Ye()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Fk(r/1960))-r,10<r){e.timeoutHandle=Nu(vr.bind(null,e,$t,$n),r);break}vr(e,$t,$n);break;case 5:vr(e,$t,$n);break;default:throw Error(se(329))}}}return Ot(e,Ye()),e.callbackNode===n?Zg.bind(null,e):null}function Gu(e,t){var n=io;return e.current.memoizedState.isDehydrated&&(Nr(e,t).flags|=256),e=ll(e,t),e!==2&&(t=$t,$t=n,t!==null&&Ku(t)),e}function Ku(e){$t===null?$t=e:$t.push.apply($t,e)}function Dk(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var i=n[r],o=i.getSnapshot;i=i.value;try{if(!yn(o(),i))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Yn(e,t){for(t&=~dd,t&=~Ll,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-fn(t),r=1<<n;e[n]=-1,t&=~r}}function pp(e){if($e&6)throw Error(se(327));di();var t=Hs(e,0);if(!(t&1))return Ot(e,Ye()),null;var n=ll(e,t);if(e.tag!==0&&n===2){var r=xu(e);r!==0&&(t=r,n=Gu(e,r))}if(n===1)throw n=To,Nr(e,0),Yn(e,t),Ot(e,Ye()),n;if(n===6)throw Error(se(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,vr(e,$t,$n),Ot(e,Ye()),null}function pd(e,t){var n=$e;$e|=1;try{return e(t)}finally{$e=n,$e===0&&(ki=Ye()+500,_l&&pr())}}function Rr(e){Zn!==null&&Zn.tag===0&&!($e&6)&&di();var t=$e;$e|=1;var n=tn.transition,r=Ae;try{if(tn.transition=null,Ae=1,e)return e()}finally{Ae=r,tn.transition=n,$e=t,!($e&6)&&pr()}}function hd(){zt=ii.current,Be(ii)}function Nr(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,mk(n)),et!==null)for(n=et.return;n!==null;){var r=n;switch(qc(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&qs();break;case 3:vi(),Be(Lt),Be(wt),rd();break;case 5:nd(r);break;case 4:vi();break;case 13:Be(We);break;case 19:Be(We);break;case 10:Zc(r.type._context);break;case 22:case 23:hd()}n=n.return}if(ut=e,et=e=sr(e.current,null),mt=zt=t,it=0,To=null,dd=Ll=Or=0,$t=io=null,Er!==null){for(t=0;t<Er.length;t++)if(n=Er[t],r=n.interleaved,r!==null){n.interleaved=null;var i=r.next,o=n.pending;if(o!==null){var s=o.next;o.next=i,r.next=s}n.pending=r}Er=null}return e}function Jg(e,t){do{var n=et;try{if(Qc(),Ns.current=rl,nl){for(var r=Ve.memoizedState;r!==null;){var i=r.queue;i!==null&&(i.pending=null),r=r.next}nl=!1}if(Ar=0,at=rt=Ve=null,no=!1,No=0,cd.current=null,n===null||n.return===null){it=1,To=t,et=null;break}e:{var o=e,s=n.return,l=n,a=t;if(t=mt,l.flags|=32768,a!==null&&typeof a=="object"&&typeof a.then=="function"){var u=a,c=l,d=c.tag;if(!(c.mode&1)&&(d===0||d===11||d===15)){var h=c.alternate;h?(c.updateQueue=h.updateQueue,c.memoizedState=h.memoizedState,c.lanes=h.lanes):(c.updateQueue=null,c.memoizedState=null)}var p=ep(s);if(p!==null){p.flags&=-257,tp(p,s,l,o,t),p.mode&1&&Jf(o,u,t),t=p,a=u;var y=t.updateQueue;if(y===null){var v=new Set;v.add(a),t.updateQueue=v}else y.add(a);break e}else{if(!(t&1)){Jf(o,u,t),md();break e}a=Error(se(426))}}else if(He&&l.mode&1){var w=ep(s);if(w!==null){!(w.flags&65536)&&(w.flags|=256),tp(w,s,l,o,t),Yc(wi(a,l));break e}}o=a=wi(a,l),it!==4&&(it=2),io===null?io=[o]:io.push(o),o=s;do{switch(o.tag){case 3:o.flags|=65536,t&=-t,o.lanes|=t;var x=Mg(o,a,t);Kf(o,x);break e;case 1:l=a;var m=o.type,g=o.stateNode;if(!(o.flags&128)&&(typeof m.getDerivedStateFromError=="function"||g!==null&&typeof g.componentDidCatch=="function"&&(ir===null||!ir.has(g)))){o.flags|=65536,t&=-t,o.lanes|=t;var k=Pg(o,l,t);Kf(o,k);break e}}o=o.return}while(o!==null)}ny(n)}catch(C){t=C,et===n&&n!==null&&(et=n=n.return);continue}break}while(!0)}function ey(){var e=il.current;return il.current=rl,e===null?rl:e}function md(){(it===0||it===3||it===2)&&(it=4),ut===null||!(Or&268435455)&&!(Ll&268435455)||Yn(ut,mt)}function ll(e,t){var n=$e;$e|=2;var r=ey();(ut!==e||mt!==t)&&($n=null,Nr(e,t));do try{zk();break}catch(i){Jg(e,i)}while(!0);if(Qc(),$e=n,il.current=r,et!==null)throw Error(se(261));return ut=null,mt=0,it}function zk(){for(;et!==null;)ty(et)}function Bk(){for(;et!==null&&!fw();)ty(et)}function ty(e){var t=iy(e.alternate,e,zt);e.memoizedProps=e.pendingProps,t===null?ny(e):et=t,cd.current=null}function ny(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=Ok(n,t),n!==null){n.flags&=32767,et=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{it=6,et=null;return}}else if(n=Ak(n,t,zt),n!==null){et=n;return}if(t=t.sibling,t!==null){et=t;return}et=t=e}while(t!==null);it===0&&(it=5)}function vr(e,t,n){var r=Ae,i=tn.transition;try{tn.transition=null,Ae=1,Uk(e,t,n,r)}finally{tn.transition=i,Ae=r}return null}function Uk(e,t,n,r){do di();while(Zn!==null);if($e&6)throw Error(se(327));n=e.finishedWork;var i=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(se(177));e.callbackNode=null,e.callbackPriority=0;var o=n.lanes|n.childLanes;if(bw(e,o),e===ut&&(et=ut=null,mt=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||ls||(ls=!0,oy(Us,function(){return di(),null})),o=(n.flags&15990)!==0,n.subtreeFlags&15990||o){o=tn.transition,tn.transition=null;var s=Ae;Ae=1;var l=$e;$e|=4,cd.current=null,Mk(e,n),Xg(n,e),ak(Su),Ws=!!Eu,Su=Eu=null,e.current=n,Pk(n),pw(),$e=l,Ae=s,tn.transition=o}else e.current=n;if(ls&&(ls=!1,Zn=e,sl=i),o=e.pendingLanes,o===0&&(ir=null),gw(n.stateNode),Ot(e,Ye()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)i=t[n],r(i.value,{componentStack:i.stack,digest:i.digest});if(ol)throw ol=!1,e=Wu,Wu=null,e;return sl&1&&e.tag!==0&&di(),o=e.pendingLanes,o&1?e===Vu?oo++:(oo=0,Vu=e):oo=0,pr(),null}function di(){if(Zn!==null){var e=Mm(sl),t=tn.transition,n=Ae;try{if(tn.transition=null,Ae=16>e?16:e,Zn===null)var r=!1;else{if(e=Zn,Zn=null,sl=0,$e&6)throw Error(se(331));var i=$e;for($e|=4,fe=e.current;fe!==null;){var o=fe,s=o.child;if(fe.flags&16){var l=o.deletions;if(l!==null){for(var a=0;a<l.length;a++){var u=l[a];for(fe=u;fe!==null;){var c=fe;switch(c.tag){case 0:case 11:case 15:ro(8,c,o)}var d=c.child;if(d!==null)d.return=c,fe=d;else for(;fe!==null;){c=fe;var h=c.sibling,p=c.return;if(Kg(c),c===u){fe=null;break}if(h!==null){h.return=p,fe=h;break}fe=p}}}var y=o.alternate;if(y!==null){var v=y.child;if(v!==null){y.child=null;do{var w=v.sibling;v.sibling=null,v=w}while(v!==null)}}fe=o}}if(o.subtreeFlags&2064&&s!==null)s.return=o,fe=s;else e:for(;fe!==null;){if(o=fe,o.flags&2048)switch(o.tag){case 0:case 11:case 15:ro(9,o,o.return)}var x=o.sibling;if(x!==null){x.return=o.return,fe=x;break e}fe=o.return}}var m=e.current;for(fe=m;fe!==null;){s=fe;var g=s.child;if(s.subtreeFlags&2064&&g!==null)g.return=s,fe=g;else e:for(s=m;fe!==null;){if(l=fe,l.flags&2048)try{switch(l.tag){case 0:case 11:case 15:Il(9,l)}}catch(C){qe(l,l.return,C)}if(l===s){fe=null;break e}var k=l.sibling;if(k!==null){k.return=l.return,fe=k;break e}fe=l.return}}if($e=i,pr(),Sn&&typeof Sn.onPostCommitFiberRoot=="function")try{Sn.onPostCommitFiberRoot(El,e)}catch{}r=!0}return r}finally{Ae=n,tn.transition=t}}return!1}function hp(e,t,n){t=wi(n,t),t=Mg(e,t,1),e=rr(e,t,1),t=Et(),e!==null&&(Ro(e,1,t),Ot(e,t))}function qe(e,t,n){if(e.tag===3)hp(e,e,n);else for(;t!==null;){if(t.tag===3){hp(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(ir===null||!ir.has(r))){e=wi(n,e),e=Pg(t,e,1),t=rr(t,e,1),e=Et(),t!==null&&(Ro(t,1,e),Ot(t,e));break}}t=t.return}}function Hk(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=Et(),e.pingedLanes|=e.suspendedLanes&n,ut===e&&(mt&n)===n&&(it===4||it===3&&(mt&130023424)===mt&&500>Ye()-fd?Nr(e,0):dd|=n),Ot(e,t)}function ry(e,t){t===0&&(e.mode&1?(t=Qo,Qo<<=1,!(Qo&130023424)&&(Qo=4194304)):t=1);var n=Et();e=Pn(e,t),e!==null&&(Ro(e,t,n),Ot(e,n))}function Wk(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),ry(e,n)}function Vk(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(se(314))}r!==null&&r.delete(t),ry(e,n)}var iy;iy=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Lt.current)It=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return It=!1,Lk(e,t,n);It=!!(e.flags&131072)}else It=!1,He&&t.flags&1048576&&ag(t,Qs,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;_s(e,t),e=t.pendingProps;var i=gi(t,wt.current);ci(t,n),i=od(null,t,r,e,i,n);var o=sd();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,At(r)?(o=!0,Ys(t)):o=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,ed(t),i.updater=$l,t.stateNode=i,i._reactInternals=t,Au(t,r,e,n),t=Mu(null,t,r,!0,o,n)):(t.tag=0,He&&o&&Kc(t),bt(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(_s(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=Kk(r),e=ln(r,e),i){case 0:t=Ru(null,t,r,e,n);break e;case 1:t=ip(null,t,r,e,n);break e;case 11:t=np(null,t,r,e,n);break e;case 14:t=rp(null,t,r,ln(r.type,e),n);break e}throw Error(se(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ln(r,i),Ru(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ln(r,i),ip(e,t,r,i,n);case 3:e:{if(Bg(t),e===null)throw Error(se(387));r=t.pendingProps,o=t.memoizedState,i=o.element,hg(e,t),el(t,r,null,n);var s=t.memoizedState;if(r=s.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){i=wi(Error(se(423)),t),t=op(e,t,r,n,i);break e}else if(r!==i){i=wi(Error(se(424)),t),t=op(e,t,r,n,i);break e}else for(Bt=nr(t.stateNode.containerInfo.firstChild),Ut=t,He=!0,cn=null,n=fg(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(yi(),r===i){t=Fn(e,t,n);break e}bt(e,t,r,n)}t=t.child}return t;case 5:return mg(t),e===null&&$u(t),r=t.type,i=t.pendingProps,o=e!==null?e.memoizedProps:null,s=i.children,Cu(r,i)?s=null:o!==null&&Cu(r,o)&&(t.flags|=32),zg(e,t),bt(e,t,s,n),t.child;case 6:return e===null&&$u(t),null;case 13:return Ug(e,t,n);case 4:return td(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=xi(t,null,r,n):bt(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ln(r,i),np(e,t,r,i,n);case 7:return bt(e,t,t.pendingProps,n),t.child;case 8:return bt(e,t,t.pendingProps.children,n),t.child;case 12:return bt(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,o=t.memoizedProps,s=i.value,De(Zs,r._currentValue),r._currentValue=s,o!==null)if(yn(o.value,s)){if(o.children===i.children&&!Lt.current){t=Fn(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var l=o.dependencies;if(l!==null){s=o.child;for(var a=l.firstContext;a!==null;){if(a.context===r){if(o.tag===1){a=On(-1,n&-n),a.tag=2;var u=o.updateQueue;if(u!==null){u=u.shared;var c=u.pending;c===null?a.next=a:(a.next=c.next,c.next=a),u.pending=a}}o.lanes|=n,a=o.alternate,a!==null&&(a.lanes|=n),Iu(o.return,n,t),l.lanes|=n;break}a=a.next}}else if(o.tag===10)s=o.type===t.type?null:o.child;else if(o.tag===18){if(s=o.return,s===null)throw Error(se(341));s.lanes|=n,l=s.alternate,l!==null&&(l.lanes|=n),Iu(s,n,t),s=o.sibling}else s=o.child;if(s!==null)s.return=o;else for(s=o;s!==null;){if(s===t){s=null;break}if(o=s.sibling,o!==null){o.return=s.return,s=o;break}s=s.return}o=s}bt(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,ci(t,n),i=nn(i),r=r(i),t.flags|=1,bt(e,t,r,n),t.child;case 14:return r=t.type,i=ln(r,t.pendingProps),i=ln(r.type,i),rp(e,t,r,i,n);case 15:return Fg(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ln(r,i),_s(e,t),t.tag=1,At(r)?(e=!0,Ys(t)):e=!1,ci(t,n),Rg(t,r,i),Au(t,r,i,n),Mu(null,t,r,!0,e,n);case 19:return Hg(e,t,n);case 22:return Dg(e,t,n)}throw Error(se(156,t.tag))};function oy(e,t){return Lm(e,t)}function Gk(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function en(e,t,n,r){return new Gk(e,t,n,r)}function gd(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Kk(e){if(typeof e=="function")return gd(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Rc)return 11;if(e===Mc)return 14}return 2}function sr(e,t){var n=e.alternate;return n===null?(n=en(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Is(e,t,n,r,i,o){var s=2;if(r=e,typeof e=="function")gd(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case qr:return jr(n.children,i,o,t);case Oc:s=8,i|=8;break;case ru:return e=en(12,n,t,i|2),e.elementType=ru,e.lanes=o,e;case iu:return e=en(13,n,t,i),e.elementType=iu,e.lanes=o,e;case ou:return e=en(19,n,t,i),e.elementType=ou,e.lanes=o,e;case mm:return Al(n,i,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case pm:s=10;break e;case hm:s=9;break e;case Rc:s=11;break e;case Mc:s=14;break e;case Gn:s=16,r=null;break e}throw Error(se(130,e==null?e:typeof e,""))}return t=en(s,n,t,i),t.elementType=e,t.type=r,t.lanes=o,t}function jr(e,t,n,r){return e=en(7,e,r,t),e.lanes=n,e}function Al(e,t,n,r){return e=en(22,e,r,t),e.elementType=mm,e.lanes=n,e.stateNode={isHidden:!1},e}function ba(e,t,n){return e=en(6,e,null,t),e.lanes=n,e}function Ea(e,t,n){return t=en(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function qk(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=ra(0),this.expirationTimes=ra(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ra(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function yd(e,t,n,r,i,o,s,l,a){return e=new qk(e,t,n,l,a),t===1?(t=1,o===!0&&(t|=8)):t=0,o=en(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},ed(o),e}function Yk(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Kr,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function sy(e){if(!e)return ar;e=e._reactInternals;e:{if(zr(e)!==e||e.tag!==1)throw Error(se(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(At(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(se(171))}if(e.tag===1){var n=e.type;if(At(n))return sg(e,n,t)}return t}function ly(e,t,n,r,i,o,s,l,a){return e=yd(n,r,!0,e,i,o,s,l,a),e.context=sy(null),n=e.current,r=Et(),i=or(n),o=On(r,i),o.callback=t??null,rr(n,o,i),e.current.lanes=i,Ro(e,i,r),Ot(e,r),e}function Ol(e,t,n,r){var i=t.current,o=Et(),s=or(i);return n=sy(n),t.context===null?t.context=n:t.pendingContext=n,t=On(o,s),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=rr(i,t,s),e!==null&&(pn(e,i,s,o),Cs(e,i,s)),s}function al(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function mp(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function xd(e,t){mp(e,t),(e=e.alternate)&&mp(e,t)}function Xk(){return null}var ay=typeof reportError=="function"?reportError:function(e){console.error(e)};function vd(e){this._internalRoot=e}Rl.prototype.render=vd.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(se(409));Ol(e,t,null,null)};Rl.prototype.unmount=vd.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Rr(function(){Ol(null,e,null,null)}),t[Mn]=null}};function Rl(e){this._internalRoot=e}Rl.prototype.unstable_scheduleHydration=function(e){if(e){var t=Dm();e={blockedOn:null,target:e,priority:t};for(var n=0;n<qn.length&&t!==0&&t<qn[n].priority;n++);qn.splice(n,0,e),n===0&&Bm(e)}};function wd(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Ml(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function gp(){}function Qk(e,t,n,r,i){if(i){if(typeof r=="function"){var o=r;r=function(){var u=al(s);o.call(u)}}var s=ly(t,r,e,0,null,!1,!1,"",gp);return e._reactRootContainer=s,e[Mn]=s.current,ko(e.nodeType===8?e.parentNode:e),Rr(),s}for(;i=e.lastChild;)e.removeChild(i);if(typeof r=="function"){var l=r;r=function(){var u=al(a);l.call(u)}}var a=yd(e,0,!1,null,null,!1,!1,"",gp);return e._reactRootContainer=a,e[Mn]=a.current,ko(e.nodeType===8?e.parentNode:e),Rr(function(){Ol(t,a,n,r)}),a}function Pl(e,t,n,r,i){var o=n._reactRootContainer;if(o){var s=o;if(typeof i=="function"){var l=i;i=function(){var a=al(s);l.call(a)}}Ol(t,s,e,i)}else s=Qk(n,t,e,i,r);return al(s)}Pm=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=qi(t.pendingLanes);n!==0&&(Dc(t,n|1),Ot(t,Ye()),!($e&6)&&(ki=Ye()+500,pr()))}break;case 13:Rr(function(){var r=Pn(e,1);if(r!==null){var i=Et();pn(r,e,1,i)}}),xd(e,1)}};zc=function(e){if(e.tag===13){var t=Pn(e,134217728);if(t!==null){var n=Et();pn(t,e,134217728,n)}xd(e,134217728)}};Fm=function(e){if(e.tag===13){var t=or(e),n=Pn(e,t);if(n!==null){var r=Et();pn(n,e,t,r)}xd(e,t)}};Dm=function(){return Ae};zm=function(e,t){var n=Ae;try{return Ae=e,t()}finally{Ae=n}};mu=function(e,t,n){switch(t){case"input":if(au(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var i=jl(r);if(!i)throw Error(se(90));ym(r),au(r,i)}}}break;case"textarea":vm(e,n);break;case"select":t=n.value,t!=null&&si(e,!!n.multiple,t,!1)}};Nm=pd;jm=Rr;var Zk={usingClientEntryPoint:!1,Events:[Po,Zr,jl,Sm,Cm,pd]},Di={findFiberByHostInstance:br,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},Jk={bundleType:Di.bundleType,version:Di.version,rendererPackageName:Di.rendererPackageName,rendererConfig:Di.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:zn.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=$m(e),e===null?null:e.stateNode},findFiberByHostInstance:Di.findFiberByHostInstance||Xk,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var as=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!as.isDisabled&&as.supportsFiber)try{El=as.inject(Jk),Sn=as}catch{}}Wt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Zk;Wt.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!wd(t))throw Error(se(200));return Yk(e,t,null,n)};Wt.createRoot=function(e,t){if(!wd(e))throw Error(se(299));var n=!1,r="",i=ay;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(i=t.onRecoverableError)),t=yd(e,1,!1,null,null,n,!1,r,i),e[Mn]=t.current,ko(e.nodeType===8?e.parentNode:e),new vd(t)};Wt.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(se(188)):(e=Object.keys(e).join(","),Error(se(268,e)));return e=$m(t),e=e===null?null:e.stateNode,e};Wt.flushSync=function(e){return Rr(e)};Wt.hydrate=function(e,t,n){if(!Ml(t))throw Error(se(200));return Pl(null,e,t,!0,n)};Wt.hydrateRoot=function(e,t,n){if(!wd(e))throw Error(se(405));var r=n!=null&&n.hydratedSources||null,i=!1,o="",s=ay;if(n!=null&&(n.unstable_strictMode===!0&&(i=!0),n.identifierPrefix!==void 0&&(o=n.identifierPrefix),n.onRecoverableError!==void 0&&(s=n.onRecoverableError)),t=ly(t,null,e,1,n??null,i,!1,o,s),e[Mn]=t.current,ko(e),r)for(e=0;e<r.length;e++)n=r[e],i=n._getVersion,i=i(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,i]:t.mutableSourceEagerHydrationData.push(n,i);return new Rl(t)};Wt.render=function(e,t,n){if(!Ml(t))throw Error(se(200));return Pl(null,e,t,!1,n)};Wt.unmountComponentAtNode=function(e){if(!Ml(e))throw Error(se(40));return e._reactRootContainer?(Rr(function(){Pl(null,null,e,!1,function(){e._reactRootContainer=null,e[Mn]=null})}),!0):!1};Wt.unstable_batchedUpdates=pd;Wt.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Ml(n))throw Error(se(200));if(e==null||e._reactInternals===void 0)throw Error(se(38));return Pl(e,t,n,!1,r)};Wt.version="18.3.1-next-f1338f8080-20240426";function uy(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(uy)}catch(e){console.error(e)}}uy(),um.exports=Wt;var e0=um.exports,cy,yp=e0;cy=yp.createRoot,yp.hydrateRoot;const Mr=6;function $o(e){return f.jsx("div",{className:"ds-divider",role:"separator","aria-orientation":"vertical",title:e.title,onDoubleClick:e.onReset,onPointerDown:t=>{if(t.button!==0)return;t.preventDefault();const n=t.currentTarget,r=t.clientX,i=e.start();n.setPointerCapture(t.pointerId),n.classList.add("dragging"),document.body.classList.add("ds-resizing");const o=l=>e.onDrag(i,l.clientX-r),s=()=>{n.removeEventListener("pointermove",o),n.removeEventListener("pointerup",s),n.removeEventListener("pointercancel",s),n.classList.remove("dragging"),document.body.classList.remove("ds-resizing"),e.onEnd()};n.addEventListener("pointermove",o),n.addEventListener("pointerup",s),n.addEventListener("pointercancel",s)}})}function dy(e){const[t,n]=U.useState(0);return U.useEffect(()=>{const r=e.current;if(!r)return;const i=new ResizeObserver(()=>n(r.clientWidth));return i.observe(r),n(r.clientWidth),()=>i.disconnect()},[e]),t}async function Do(e){try{await navigator.clipboard.writeText(e)}catch{const t=document.createElement("textarea");t.value=e,document.body.appendChild(t),t.select(),document.execCommand("copy"),t.remove()}}/*!
|
|
41
|
+
* Icon paths from Feather (https://github.com/feathericons/feather)
|
|
42
|
+
* The MIT License (MIT)
|
|
43
|
+
* Copyright (c) 2013-2023 Cole Bemis
|
|
44
|
+
*
|
|
45
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
46
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
47
|
+
* in the Software without restriction, including without limitation the rights
|
|
48
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
49
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
50
|
+
* furnished to do so, subject to the following conditions:
|
|
51
|
+
*
|
|
52
|
+
* The above copyright notice and this permission notice shall be included in all
|
|
53
|
+
* copies or substantial portions of the Software.
|
|
54
|
+
*
|
|
55
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
56
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
57
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
58
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
59
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
60
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
61
|
+
* SOFTWARE.
|
|
62
|
+
*/function Sa({on:e,size:t=14,x:n,y:r}){return f.jsx("svg",{className:`eye${e?" on":""}`,x:n,y:r,width:t,height:t,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:e?f.jsxs(f.Fragment,{children:[f.jsx("path",{d:"M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"}),f.jsx("circle",{cx:"12",cy:"12",r:"3"})]}):f.jsxs(f.Fragment,{children:[f.jsx("path",{d:"M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19m-6.72-1.07a3 3 0 1 1-4.24-4.24"}),f.jsx("line",{x1:"1",y1:"1",x2:"23",y2:"23"})]})})}function qu({on:e,size:t=14,x:n,y:r}){return f.jsxs("svg",{className:`pin-icon${e?" on":""}`,x:n,y:r,width:t,height:t,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[f.jsx("path",{d:"M8 3h8"}),f.jsx("path",{d:"M9.5 3v6L6 14h12l-3.5-5V3z",fill:e?"currentColor":"none"}),f.jsx("path",{d:"M12 14v7"})]})}function hr({size:e=18,x:t,y:n,className:r,children:i}){return f.jsx("svg",{className:r,x:t,y:n,width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:i})}function t0(e){return f.jsxs(hr,{...e,children:[f.jsx("circle",{cx:"18",cy:"5",r:"3"}),f.jsx("circle",{cx:"6",cy:"12",r:"3"}),f.jsx("circle",{cx:"18",cy:"19",r:"3"}),f.jsx("line",{x1:"8.59",y1:"13.51",x2:"15.42",y2:"17.49"}),f.jsx("line",{x1:"15.41",y1:"6.51",x2:"8.59",y2:"10.49"})]})}function n0(e){return f.jsxs(hr,{...e,children:[f.jsx("ellipse",{cx:"12",cy:"5",rx:"9",ry:"3"}),f.jsx("path",{d:"M21 12c0 1.66-4 3-9 3s-9-1.34-9-3"}),f.jsx("path",{d:"M3 5v14c0 1.66 4 3 9 3s9-1.34 9-3V5"})]})}function _i({size:e=14,...t}){return f.jsx(hr,{size:e,...t,children:f.jsx("path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"})})}function fy({size:e=14,...t}){return f.jsxs(hr,{size:e,...t,children:[f.jsx("rect",{x:"9",y:"9",width:"13",height:"13",rx:"2",ry:"2"}),f.jsx("path",{d:"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"})]})}function r0({size:e=14,...t}){return f.jsxs(hr,{size:e,...t,children:[f.jsx("polyline",{points:"23 4 23 10 17 10"}),f.jsx("polyline",{points:"1 20 1 14 7 14"}),f.jsx("path",{d:"M3.51 9a9 9 0 0 1 14.85-3.36L23 10M1 14l4.64 4.36A9 9 0 0 0 20.49 15"})]})}function Yu({size:e=14,...t}){return f.jsx(hr,{size:e,...t,children:f.jsx("polyline",{points:"20 6 9 17 4 12"})})}function kd(e){return f.jsxs(hr,{...e,children:[f.jsx("path",{d:"M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"}),f.jsx("polyline",{points:"14 2 14 8 20 8"}),f.jsx("line",{x1:"16",y1:"13",x2:"8",y2:"13"}),f.jsx("line",{x1:"16",y1:"17",x2:"8",y2:"17"}),f.jsx("polyline",{points:"10 9 9 9 8 9"})]})}function py({size:e=14,...t}){return f.jsx(hr,{size:e,...t,children:f.jsx("polyline",{points:"6 9 12 15 18 9"})})}function Io({n:e,title:t,className:n}){return f.jsxs("span",{className:`ds-count${n?` ${n}`:""}`,title:t,children:[f.jsx(_i,{size:12}),e]})}const i0=U.forwardRef(function({value:t,onChange:n,onSave:r,onCancel:i,placeholder:o,autoFocus:s,className:l},a){return f.jsx("textarea",{ref:a,className:l,autoFocus:s,value:t,placeholder:o,onChange:u=>n(u.target.value),onKeyDown:u=>{u.key==="Enter"&&(u.metaKey||u.ctrlKey)&&(u.preventDefault(),r()),u.key==="Escape"&&(u.preventDefault(),u.stopPropagation(),u.target.blur(),i())}})});function jn(e,t){try{const n=localStorage.getItem(e);return n===null?t:JSON.parse(n)}catch{return t}}function hn(e,t){try{localStorage.setItem(e,JSON.stringify(t))}catch{}}function o0(e){try{localStorage.removeItem(e)}catch{}}function Ca(e){const[t,n]=U.useState(()=>{const r=jn(e,[]);return new Set(Array.isArray(r)?r:[])});return U.useEffect(()=>hn(e,[...t]),[e,t]),[t,n]}function Xu(e,t,n){try{return localStorage.getItem(`${e}.${t}`)??n}catch{return n}}function Qu(e,t,n){try{localStorage.setItem(`${e}.${t}`,n)}catch{}}function bd(e){const t=jn(e,[]);return Array.isArray(t)?t:[]}function Ed(e,t){t.length?hn(e,t):o0(e)}const hy=()=>`${Date.now().toString(36)}${Math.random().toString(36).slice(2,7)}`,my={open:"未対応",partial:"一部解消",updated:"コメント後に変更あり",resolved:"解消済み?"};function Fl(e){return["以下は、git の差分のレビュービューア diffshape で付けたレビューコメントです。各指摘に対応してください。",`リポジトリ: ${e.repoRoot}`,`比較: ${e.targetLabel} と ${e.baseLabel} の差分`]}function Sd(e){const[t,n]=U.useState(!1),r=async()=>{await e.onCopy(),n(!0),window.setTimeout(()=>n(!1),1600)};return f.jsxs("article",{className:`ds-comment ${e.state}${e.lit?" lit":""}${e.editing?" editing":""}`,onMouseEnter:e.onMouseEnter,onMouseLeave:e.onMouseLeave,children:[e.top&&f.jsx("div",{className:"ds-comment-top",children:e.top}),f.jsx("div",{className:"ds-comment-body",children:e.body}),f.jsxs("div",{className:"ds-comment-foot",children:[f.jsx("span",{className:`ds-comment-state ${e.state}`,title:e.stateTitle,children:my[e.state]}),e.meta&&f.jsx("span",{className:"ds-muted",children:e.meta}),f.jsx("span",{className:"ds-spacer"}),f.jsx("button",{className:"ds-link",onClick:()=>void r(),title:"このコメントだけ AI 用にコピー",children:t?"コピーしました":"コピー"}),f.jsx("button",{className:"ds-link",onClick:e.onEdit,children:"編集"}),f.jsx("button",{className:"ds-link danger",onClick:()=>{window.confirm("このコメントを削除しますか?")&&e.onDelete()},children:"削除"})]})]})}const Cd=U.forwardRef(function(t,n){const r=(t.canSave??!0)&&t.value.trim()!=="";return f.jsxs("div",{className:`ds-composer${t.editing?" editing":""}${t.className?` ${t.className}`:""}`,children:[t.top&&f.jsx("div",{className:"ds-composer-top",children:t.top}),f.jsx(i0,{ref:n,className:"ds-composer-input",autoFocus:t.autoFocus,value:t.value,placeholder:t.placeholder,onChange:t.onChange,onSave:()=>r&&t.onSave(),onCancel:t.onCancel}),f.jsxs("div",{className:"ds-composer-foot",children:[f.jsx("span",{className:"ds-muted",children:"⌘ / Ctrl + Enter で保存 ・ Esc でキャンセル"}),f.jsx("span",{className:"ds-spacer"}),(t.showCancel??!0)&&f.jsx("button",{className:"ds-btn",onClick:t.onCancel,children:"キャンセル"}),f.jsx("button",{className:"ds-btn ds-btn-primary",onClick:t.onSave,disabled:!r,children:t.editing?"更新":"保存"})]})]})});function so(e){const t=JSON.stringify(e);let n=5381;for(let r=0;r<t.length;r++)n=(n<<5)+n+t.charCodeAt(r)|0;return(n>>>0).toString(36)}const xp=[["added","追加"],["modified","変更"],["removed","削除"]];function Dl({stats:e,unit:t,showZero:n=!1}){const r=xp.filter(([o])=>n||e[o]>0);if(r.length===0)return null;const i=xp.map(([o,s])=>`${s} ${e[o]}`).join("・")+` ${t}`;return f.jsx("span",{className:"ds-status",title:i,children:r.map(([o])=>f.jsxs("span",{className:`ds-status-n ${o}${e[o]===0?" zero":""}`,children:[f.jsx("span",{className:"ds-status-dot",children:"●"}),e[o]]},o))})}function Ti({stats:e,title:t,showZero:n=!1}){const r=[["added","+",e.added],["removed","−",e.removed]];e.modified!==void 0&&r.push(["modified","~",e.modified]);const i=r.filter(([,,o])=>n||o>0);return i.length===0?null:f.jsx("span",{className:"ds-change",title:t,children:i.map(([o,s,l])=>f.jsxs("span",{className:l?o:"zero",children:[s,l]},o))})}function Nd({children:e}){return f.jsx("header",{className:"ds-bar",children:e})}function jd({children:e}){return f.jsx("span",{className:"ds-bar-counts",children:e})}function bi({children:e}){return f.jsx("span",{className:"ds-bar-label",children:e})}function _d(){return f.jsx("span",{className:"ds-bar-sep"})}function Td(){return f.jsx("span",{className:"ds-bar-spacer"})}function $d({done:e,total:t,title:n}){return t===0?null:f.jsxs("span",{className:"ds-progress",title:n,children:[f.jsxs("span",{children:["確認済み ",e," / ",t]}),f.jsx("span",{className:"ds-progress-bar",children:f.jsx("span",{style:{width:`${e/t*100}%`}})})]})}function Id(e){var n;if(e.kind==="option")return`--schema ${e.patterns.join(" ")}`;const t=((n=e.envs)==null?void 0:n.filter(Boolean))??[];return`${e.configs.join(", ")}${t.length?`(env: ${t.join(", ")})`:""} の src`}const Ls=e=>e.diff.tables.length+e.diff.values.length+e.diff.enums.length+e.diff.domains.length,gy=e=>`カラム・制約・インデックス:追加 ${e.added}・削除 ${e.removed}・変更 ${e.modified}`;function yy(e){const t={added:0,removed:0,modified:0};for(const n of[...e.columns,...e.constraints,...e.indexes])t[n.status]++;return e.comment&&e.status==="modified"&&t.modified++,t}function s0(e){const t=new Map,n=r=>{let i=t.get(r);return i||t.set(r,i={primary:!1,unique:!1,references:[]}),i};for(const r of e)r.kind==="primary"&&r.columns.forEach(i=>n(i).primary=!0),r.kind==="unique"&&r.columns.length===1&&(n(r.columns[0]).unique=!0),r.kind==="foreign"&&r.references&&r.columns.length===1&&n(r.columns[0]).references.push({table:r.references.table,columns:r.references.columns}),r.kind==="check"&&r.values&&(n(r.values.column).values=r.values.values);return t}function l0(e){var n;return[...e.constraints.map(r=>r.after??(e.status==="removed"?r.before:void 0)).filter(r=>!!r),...((n=e.unchanged)==null?void 0:n.constraints)??[]]}function zl(e,t){const n=new Set(e??[]),r=new Set(t??[]);return[...(t??[]).map(i=>({value:i,status:e&&!n.has(i)?"added":"same"})),...(e??[]).filter(i=>!r.has(i)).map(i=>({value:i,status:"removed"}))]}function xy(e){return e.source==="check"?{label:`${e.table}.${e.column}`,table:e.table}:{label:e.type??""}}function Zu(e){const t=[{key:"type",text:e.type}];return t.push({key:"notNull",text:e.notNull?"NOT NULL":"NULL"}),e.default!==void 0&&t.push({key:"default",text:`DEFAULT ${e.default}`}),e.identity&&t.push({key:"identity",text:`IDENTITY ${e.identity==="always"?"ALWAYS":"BY DEFAULT"}`}),e.generated&&t.push({key:"generated",text:`GENERATED (${e.generated})`}),t}function lo(e){return`${e.method?`USING ${e.method} `:""}(${e.columns.join(", ")})${e.include?` INCLUDE (${e.include.join(", ")})`:""}${e.where?` WHERE ${e.where}`:""}`}function a0(e){return`${e.unique?"UNIQUE ":""}INDEX ${lo(e)}`}function u0(e,t){const n=t.trim().toLowerCase();return n?e.name.toLowerCase().includes(n)||e.columns.some(r=>r.name.toLowerCase().includes(n)):!0}const Ei=e=>`${e.kind}:${e.table??""}:${e.name}`,Ju=e=>({kind:"table",table:e,name:e});function vy(e){switch(e.kind){case"table":case"type":return e.name;case"column":case"value":return`${e.table}.${e.name}`;default:return`${e.table}:${e.name}`}}const As={table:"テーブル",column:"カラム",constraint:"制約",index:"インデックス",value:"値",type:"型"};function ec(e){return e.kind==="table"||e.kind==="type"?`${As[e.kind]} ${e.name}`:e.kind==="column"||e.kind==="value"?`${As[e.kind]} ${e.table}.${e.name}`:`${As[e.kind]} ${e.table} の ${e.name}`}function c0(e){return e.kind==="table"?"テーブル全体":e.kind==="type"?e.name:`${As[e.kind]} ${e.name}`}const Xt={added:"今回追加",removed:"今回削除",modified:"今回変更"},Na=e=>Zu(e).filter(t=>t.key!=="notNull"||e.notNull).map(t=>t.text).join(" "),ja=e=>a0(e);function d0(e){if(e.status!=="modified")return Xt[e.status];const t=[],n=(r,i)=>{const o=r.filter(u=>u.status==="added").length,s=r.filter(u=>u.status==="removed").length,l=r.filter(u=>u.status==="modified").length,a=[o&&`+${o}`,s&&`−${s}`,l&&`~${l}`].filter(Boolean).join(" ");a&&t.push(`${i} ${a}`)};return n(e.columns,"カラム"),n(e.constraints,"制約"),n(e.indexes,"インデックス"),e.comment&&t.push("コメント"),`${Xt.modified}(${t.join("、")})`}function Ld(e,t){const n=e.diff,r=t.table?n.tables.find(i=>i.name===t.table):void 0;switch(t.kind){case"table":return r?d0(r):void 0;case"column":{const i=r==null?void 0:r.columns.find(o=>o.name===t.name);return i?i.status!=="modified"?`${Xt[i.status]}: ${Na(i.after??i.before)}`:`${Xt.modified}: ${Na(i.before)} → ${Na(i.after)}`:void 0}case"constraint":{const i=r==null?void 0:r.constraints.find(o=>o.name===t.name);return i?i.status!=="modified"?`${Xt[i.status]}: ${(i.after??i.before).definition}`:`${Xt.modified}: ${i.before.definition} → ${i.after.definition}`:void 0}case"index":{const i=r==null?void 0:r.indexes.find(o=>o.name===t.name);return i?i.status!=="modified"?`${Xt[i.status]}: ${ja(i.after??i.before)}`:`${Xt.modified}: ${ja(i.before)} → ${ja(i.after)}`:void 0}case"value":{const i=n.values.find(o=>o.source==="check"&&o.table===t.table&&o.column===t.name);return i?vp(i):void 0}case"type":{const i=n.enums.find(l=>l.name===t.name);if(i){if(i.status!=="modified")return`${Xt[i.status]}: ENUM (${(i.after??i.before).values.join(", ")})`;const l=n.values.find(a=>a.type===t.name);return l?`値の変更: ${vp(l)}`:Xt.modified}const o=n.domains.find(l=>l.name===t.name);if(!o)return;const s=l=>`${l.type}${l.notNull?" NOT NULL":""}${l.checks.map(a=>` ${a.definition}`).join("")}`;return o.status!=="modified"?`${Xt[o.status]}: DOMAIN ${s(o.after??o.before)}`:`${Xt.modified}: ${s(o.before)} → ${s(o.after)}`}}}function vp(e){return e.status==="added"?`値の制限を追加(${(e.after??[]).join(", ")})`:e.status==="removed"?`値の制限を削除(変更前: ${(e.before??[]).join(", ")})`:`${[...e.added.map(n=>`+${n}`),...e.removed.map(n=>`−${n}`)].join(" ")}(変更後: ${(e.after??[]).join(", ")})`}function f0(e,t){if(t.kind==="value"){const n=e.diff.values.find(r=>r.source==="check"&&r.table===t.table&&r.column===t.name);if(n!=null&&n.constraint){const r=e.locations[`${t.table}:${n.constraint}`];if(r)return r}}return e.locations[vy(t)]}function p0(e,t){const n=e.locations[vy(t)];return!!n&&!n.base}function fi(e,t){const n=Ld(e,t.target);return!p0(e,t.target)&&!n||t.snapshot!==void 0&&n===void 0?"resolved":n!==t.snapshot?"updated":"open"}function h0(e,t,n){return{id:hy(),target:t,body:n,createdAt:Date.now(),snapshot:Ld(e,t)}}const m0=e=>e?e.base?`比較元の ${e.file}:${e.line}(変更後にはありません)`:`${e.file}:${e.line}`:void 0;function wy(e,t,n={}){const r=n.includeResolved?t:t.filter(o=>fi(e,o)!=="resolved"),i=[...n.header===!1?[]:[...Fl({repoRoot:e.repoRoot,targetLabel:e.target.label,baseLabel:e.base.label}),"対象: DB スキーマ(dbshape)"],`スキーマの SQL: ${Id(e.schemaFrom)}`,""];return r.forEach((o,s)=>{const l=fi(e,o),a=Ld(e,o.target);i.push(`${s+1}. ${ec(o.target)}${a?`(${a})`:"(変更なし)"}${l==="resolved"?"(解消済み?)":""}`);const u=m0(f0(e,o.target));u&&i.push(` 定義: ${u}`),l==="updated"&&i.push(` コメントしたときは: ${o.snapshot??"変更なし"}`),i.push(` コメント: ${o.body.trim().replace(/\n/g,`
|
|
63
|
+
`)}`),i.push("")}),{text:i.join(`
|
|
64
|
+
`).trimEnd()+`
|
|
65
|
+
`,included:r.length,skipped:t.length-r.length}}const ky="dbshape.comments:",g0=e=>bd(ky+e),y0=(e,t)=>Ed(ky+e,t),by=U.createContext(null),Ad=()=>U.useContext(by),x0=my;function ur({target:e,label:t}){const n=Ad();if(!n)return null;const r=Ei(e),i=n.comments.filter(o=>Ei(o.target)===r).length;return f.jsxs("button",{className:`cbtn ${i?"has":""}`,onClick:o=>{o.stopPropagation(),n.compose(e)},title:`${t??c0(e)} にコメントする`,"aria-label":"コメントする",children:[f.jsx(_i,{size:12}),i>0&&f.jsx("span",{className:"cnum",children:i})]})}function Dn({target:e,colSpan:t}){const n=Ad();if(!n)return null;const r=Ei(e),i=n.comments.filter(s=>Ei(s.target)===r),o=n.composing===r;return!i.length&&!o?null:t?f.jsx("tr",{className:"thread-row",children:f.jsx("td",{colSpan:t,children:f.jsx(Dn,{target:e})})}):f.jsxs("div",{className:"thread",id:`c-${r}`,children:[i.map(s=>n.editing===s.id?f.jsx(wp,{initial:s.body,onSave:l=>n.update(s.id,l),onCancel:()=>n.edit(null)},s.id):f.jsx(v0,{c:s},s.id)),o&&f.jsx(wp,{initial:"",onSave:s=>n.add(e,s),onCancel:()=>n.compose(null)})]})}function v0({c:e}){const t=Ad(),n=fi(t.data,e);return f.jsx(Sd,{body:e.body,state:n,stateTitle:n==="updated"?`コメントしたときは: ${e.snapshot??"変更なし"}`:n==="resolved"?"対象がなくなったか、比較元と同じに戻りました":void 0,onCopy:()=>Do(wy(t.data,[e],{includeResolved:!0}).text),onEdit:()=>t.edit(e.id),onDelete:()=>t.remove(e.id)})}function wp({initial:e,onSave:t,onCancel:n}){const[r,i]=U.useState(e);return f.jsx(Cd,{autoFocus:!0,editing:e!=="",value:r,placeholder:"気になる点や直してほしいこと",onChange:i,onSave:()=>r.trim()&&t(r.trim()),onCancel:n})}function w0({table:e,reviewed:t,onReviewed:n,known:r,onJump:i,highlighted:o,alwaysOpen:s}){const[l,a]=U.useState(!t),[u,c]=U.useState(!1),d=yy(e),h=s0(l0(e)),p=s||l;return f.jsxs("section",{id:`table-${e.name}`,className:`card ${e.status} ${o?"highlighted":""} ${t&&!s?"reviewed":""}`,children:[f.jsxs("header",{className:"card-head",children:[!s&&f.jsx("button",{className:"fold",onClick:()=>a(!p),"aria-label":p?"たたむ":"開く","aria-expanded":p,children:p?"▾":"▸"}),f.jsxs("span",{className:"tname",children:[f.jsxs("span",{className:"schema",children:[e.schema,"."]}),e.table]}),f.jsx(Ti,{stats:d,title:gy(d)}),f.jsx("span",{className:"file",title:e.file,children:e.file}),f.jsx(ur,{target:Ju(e.name),label:"テーブル全体"}),f.jsxs("label",{className:"reviewed-box",title:"確認済みにすると、図と一覧で薄く表示します(テーブルがまた変わると外れます)",children:[f.jsx("input",{type:"checkbox",checked:t,onChange:y=>{n(y.target.checked),a(!y.target.checked)}}),"確認済み"]})]}),p&&f.jsxs("div",{className:"card-body",children:[f.jsx(Dn,{target:Ju(e.name)}),e.comment&&f.jsx(C0,{before:e.comment.before,after:e.comment.after,status:e.status}),e.status==="modified"?f.jsxs(f.Fragment,{children:[f.jsx(zi,{title:"カラム",empty:e.columns.length===0,children:f.jsx("table",{className:"cols",children:f.jsx("tbody",{children:e.columns.map(y=>f.jsx(b0,{table:e.name,change:y,badges:h.get(y.name),known:r,onJump:i},y.name))})})}),f.jsx(zi,{title:"制約",empty:e.constraints.length===0,children:e.constraints.map(y=>f.jsx(E0,{table:e.name,change:y,known:r,onJump:i},y.name))}),f.jsx(zi,{title:"インデックス",empty:e.indexes.length===0,children:e.indexes.map(y=>f.jsx(S0,{table:e.name,change:y},y.name))}),e.unchanged&&(e.unchanged.columns.length>0||e.unchanged.constraints.length>0||e.unchanged.indexes.length>0)&&f.jsxs("div",{className:"context",children:[f.jsxs("button",{className:"link",onClick:()=>c(!u),children:[u?"▾":"▸"," 変更のないカラム ",e.unchanged.columns.length,"・制約 ",e.unchanged.constraints.length,"・インデックス ",e.unchanged.indexes.length]}),u&&f.jsxs("div",{className:"context-body",children:[f.jsx("table",{className:"cols",children:f.jsx("tbody",{children:e.unchanged.columns.map(y=>f.jsx(tc,{table:e.name,c:y,badges:h.get(y.name),known:r,onJump:i},y.name))})}),e.unchanged.constraints.map(y=>f.jsx(kp,{table:e.name,c:y,known:r,onJump:i},y.name)),e.unchanged.indexes.map(y=>f.jsx(bp,{table:e.name,i:y},y.name))]})]})]}):f.jsxs(f.Fragment,{children:[f.jsx("table",{className:"cols",children:f.jsx("tbody",{children:e.columns.map(y=>f.jsx(tc,{table:e.name,c:y.after??y.before,badges:h.get(y.name),known:r,onJump:i},y.name))})}),e.constraints.length>0&&f.jsx(zi,{title:"制約",children:e.constraints.map(y=>f.jsx(kp,{table:e.name,c:y.after??y.before,known:r,onJump:i},y.name))}),e.indexes.length>0&&f.jsx(zi,{title:"インデックス",children:e.indexes.map(y=>f.jsx(bp,{table:e.name,i:y.after??y.before},y.name))})]})]})]})}function zi(e){return e.empty?null:f.jsxs("div",{className:"section",children:[f.jsx("div",{className:"section-title",children:e.title}),e.children]})}const Ey={added:"+",removed:"−",modified:"~"};function Sy({b:e,known:t,onJump:n}){return e?f.jsxs(f.Fragment,{children:[e.primary&&f.jsx("span",{className:"tag key",children:"PK"}),e.unique&&f.jsx("span",{className:"tag",children:"UNIQUE"}),e.references.map(r=>f.jsx(k0,{table:r.table,columns:r.columns,known:t,onJump:n},r.table))]}):null}function k0({table:e,columns:t,known:n,onJump:r}){const i=`→ ${e}${t.length?` (${t.join(", ")})`:""}`;return n.has(e)?f.jsx("button",{className:"tag ref link",onClick:()=>r(e),title:"このテーブルの変更へ移動",children:i}):f.jsx("span",{className:"tag ref",children:i})}const Cy=(e,t)=>({kind:"column",table:e,name:t});function tc({table:e,c:t,badges:n,known:r,onJump:i}){const o=Cy(e,t.name);return f.jsxs(f.Fragment,{children:[f.jsxs("tr",{className:"plain",children:[f.jsx("td",{className:"mark"}),f.jsx("td",{className:"cname",children:t.name}),f.jsxs("td",{children:[f.jsx("code",{children:t.type}),t.notNull&&f.jsx("span",{className:"attr",children:"NOT NULL"}),t.default!==void 0&&f.jsxs("span",{className:"attr",children:["DEFAULT ",t.default]}),t.identity&&f.jsx("span",{className:"attr",children:"IDENTITY"}),t.generated&&f.jsxs("span",{className:"attr",children:["GENERATED (",t.generated,")"]}),f.jsx(Sy,{b:n,known:r,onJump:i}),(n==null?void 0:n.values)&&f.jsx(Ny,{values:n.values}),t.comment&&f.jsx("span",{className:"comment",children:t.comment}),f.jsx(ur,{target:o})]})]}),f.jsx(Dn,{target:o,colSpan:3})]})}function Ny({values:e}){return f.jsx("span",{className:"chips",children:e.map(t=>f.jsx("span",{className:"chip",children:t},t))})}function b0({table:e,change:t,badges:n,known:r,onJump:i}){const o=Cy(e,t.name);if(t.status!=="modified"){const c=t.after??t.before;return f.jsxs(f.Fragment,{children:[f.jsxs("tr",{className:t.status,children:[f.jsx("td",{className:"mark",children:Ey[t.status]}),f.jsx("td",{className:"cname",children:t.name}),f.jsxs("td",{children:[f.jsx("code",{children:c.type}),c.notNull&&f.jsx("span",{className:"attr",children:"NOT NULL"}),c.default!==void 0&&f.jsxs("span",{className:"attr",children:["DEFAULT ",c.default]}),c.identity&&f.jsx("span",{className:"attr",children:"IDENTITY"}),c.generated&&f.jsxs("span",{className:"attr",children:["GENERATED (",c.generated,")"]}),t.status==="added"&&f.jsx(Sy,{b:n,known:r,onJump:i}),t.status==="added"&&(n==null?void 0:n.values)&&f.jsx(Ny,{values:n.values}),c.comment&&f.jsx("span",{className:"comment",children:c.comment}),f.jsx(ur,{target:o})]})]}),f.jsx(Dn,{target:o,colSpan:3})]})}const s=new Map(Zu(t.before).map(c=>[c.key,c.text])),l=Zu(t.after),a=new Set(t.changed??[]),u=[...new Set([...l.map(c=>c.key),...s.keys()])];return f.jsxs(f.Fragment,{children:[f.jsxs("tr",{className:"modified",children:[f.jsx("td",{className:"mark",children:"~"}),f.jsx("td",{className:"cname",children:t.name}),f.jsxs("td",{children:[u.map(c=>{var p;const d=(p=l.find(y=>y.key===c))==null?void 0:p.text,h=s.get(c);return a.has(c)?f.jsxs("span",{className:"attr change",children:[h!==void 0&&f.jsx("del",{children:h}),h!==void 0&&d!==void 0&&f.jsx("span",{className:"arrow",children:"→"}),d!==void 0&&f.jsx("ins",{children:d})]},c):d?f.jsx("span",{className:c==="type"?"attr type":"attr",children:d},c):null}),a.has("comment")&&f.jsxs("span",{className:"attr change",children:[f.jsx("span",{className:"muted",children:"コメント "}),t.before.comment!==void 0&&f.jsx("del",{children:t.before.comment}),f.jsx("span",{className:"arrow",children:"→"}),t.after.comment!==void 0?f.jsx("ins",{children:t.after.comment}):f.jsx("span",{className:"muted",children:"(なし)"})]}),f.jsx(ur,{target:o})]})]}),f.jsx(Dn,{target:o,colSpan:3})]})}const jy={primary:"PK",unique:"UNIQUE",check:"CHECK",foreign:"FK",exclude:"EXCLUDE"};function _y({table:e,known:t,onJump:n}){return!e||!t.has(e)?null:f.jsxs("button",{className:"jump link",onClick:()=>n(e),title:`${e} の変更へ移動`,children:["↗ ",e]})}function zo(e){return f.jsxs(f.Fragment,{children:[f.jsxs("div",{className:`row ${e.status??"plain"} ${e.target?"commentable":""}`,children:[f.jsx("span",{className:"mark",children:e.status?Ey[e.status]:""}),f.jsx("span",{className:"tag kind",children:e.kind}),f.jsx("span",{className:"rbody",children:e.children}),f.jsx("span",{className:"rname",title:e.name,children:e.name}),e.target&&f.jsx(ur,{target:e.target})]}),e.target&&f.jsx(Dn,{target:e.target})]})}const Bl=(e,t,n)=>({kind:e,table:t,name:n});function kp({table:e,c:t,known:n,onJump:r}){var i;return f.jsxs(zo,{kind:jy[t.kind],name:t.name,target:Bl("constraint",e,t.name),children:[f.jsx("code",{children:t.definition}),f.jsx(_y,{table:(i=t.references)==null?void 0:i.table,known:n,onJump:r})]})}function E0({table:e,change:t,known:n,onJump:r}){var s,l,a;const i=t.after??t.before,o=t.status==="modified"&&((s=t.before)!=null&&s.values)&&((l=t.after)!=null&&l.values)?zl(t.before.values.values,t.after.values.values):null;return f.jsxs(zo,{status:t.status,kind:jy[t.kind],name:t.name,target:Bl("constraint",e,t.name),children:[t.status!=="modified"?f.jsx("code",{children:i.definition}):o?f.jsxs(f.Fragment,{children:[f.jsxs("code",{children:[t.after.values.column,": "]}),f.jsx("span",{className:"chips",children:o.map(u=>f.jsxs("span",{className:`chip ${u.status}`,children:[u.status==="added"?"+":u.status==="removed"?"−":"",u.value]},u.value))})]}):f.jsxs("span",{className:"change-block",children:[f.jsx("del",{children:t.before.definition}),f.jsx("ins",{children:t.after.definition})]}),t.status!=="removed"&&f.jsx(_y,{table:(a=i.references)==null?void 0:a.table,known:n,onJump:r})]})}function bp({table:e,i:t}){return f.jsx(zo,{kind:t.unique?"UNIQUE":"INDEX",name:t.name,target:Bl("index",e,t.name),children:f.jsx("code",{children:lo(t)})})}function S0({table:e,change:t}){const n=t.after??t.before;return f.jsx(zo,{status:t.status,kind:n.unique?"UNIQUE":"INDEX",name:t.name,target:Bl("index",e,t.name),children:t.status==="modified"?f.jsxs("span",{className:"change-block",children:[f.jsxs("del",{children:[t.before.unique?"UNIQUE ":"",lo(t.before)]}),f.jsxs("ins",{children:[t.after.unique?"UNIQUE ":"",lo(t.after)]})]}):f.jsx("code",{children:lo(n)})})}function C0({before:e,after:t,status:n}){return n!=="modified"?f.jsx("div",{className:"table-comment",children:t??e}):f.jsx(zo,{status:"modified",kind:"COMMENT",name:"",children:f.jsxs("span",{className:"change-block",children:[e!==void 0?f.jsx("del",{children:e}):f.jsx("span",{className:"muted",children:"(なし)"}),t!==void 0?f.jsx("ins",{children:t}):f.jsx("span",{className:"muted",children:"(なし)"})]})})}function N0(e){return f.jsxs("aside",{className:"panel",children:[f.jsxs("div",{className:"panel-head",children:[f.jsx("span",{className:"panel-title",children:e.selection.name}),f.jsx("button",{className:"ds-btn ds-btn-icon",onClick:e.onClose,"aria-label":"閉じる",title:"閉じる(Esc)",children:"×"})]}),f.jsxs("div",{className:"panel-body",children:[e.selection.kind==="type"&&e.type&&f.jsx(T0,{kind:e.type.kind,change:e.type.change}),e.selection.kind==="table"&&(e.change?f.jsx(w0,{table:e.change,reviewed:e.reviewed,onReviewed:e.onReviewed,known:e.known,onJump:e.onJump,highlighted:!1,alwaysOpen:!0},e.change.name):e.erTable?f.jsx(j0,{t:e.erTable}):null),e.values.length>0&&f.jsxs("div",{className:"panel-section",children:[f.jsx("div",{className:"section-title",children:"値の変化"}),e.values.map((t,n)=>f.jsx(_0,{v:t},n))]})]})]})}function j0({t:e}){const t=Ju(e.name);return f.jsxs("div",{className:"unchanged-table",children:[f.jsxs("p",{className:"muted unchanged-note",children:["このテーブルは変更されていません。",f.jsx(ur,{target:t,label:"テーブル全体"})]}),f.jsx(Dn,{target:t}),f.jsx("table",{className:"cols",children:f.jsx("tbody",{children:e.columns.map(n=>f.jsx(tc,{table:e.name,c:{name:n.name,type:n.type,notNull:n.notNull},badges:{primary:n.primary,unique:!1,references:e.foreignKeys.filter(r=>r.columns.length===1&&r.columns[0]===n.name).map(r=>({table:r.table,columns:r.refColumns}))},known:new Set,onJump:()=>{}},n.name))})})]})}function _0({v:e}){const t=xy(e),n=zl(e.before,e.after),r=e.source==="check"?{kind:"value",table:e.table,name:e.column??""}:{kind:"type",name:e.type??""};return f.jsxs("div",{className:"value-row commentable",children:[f.jsx(ur,{target:r,label:e.source==="check"?`${e.column} の値`:void 0}),f.jsxs("div",{className:"value-head",children:[f.jsx("span",{className:"vname",children:t.label}),f.jsx("span",{className:"tag kind",children:e.source==="check"?"CHECK":e.source==="enum"?"ENUM 型":"DOMAIN"}),e.constraint&&f.jsx("span",{className:"muted",children:e.constraint}),e.status==="added"&&f.jsx("span",{className:"note",children:"値の制限が付きました"}),e.status==="removed"&&f.jsx("span",{className:"note",children:"値の制限がなくなりました"})]}),f.jsx("div",{className:"chips",children:n.map(i=>f.jsxs("span",{className:`chip ${e.status==="added"?"same":i.status}`,children:[e.status==="modified"&&i.status==="added"?"+":i.status==="removed"?"−":"",i.value]},i.value))}),e.usedBy&&e.usedBy.length>0&&f.jsxs("div",{className:"muted used",children:["使用しているカラム: ",e.usedBy.join(", ")]}),f.jsx(Dn,{target:r})]})}function T0({kind:e,change:t}){const n=t.before&&"values"in t.before?t.before.values:void 0,r=t.after&&"values"in t.after?t.after.values:void 0,i=t.after??t.before,o={kind:"type",name:t.name};return f.jsxs("div",{className:"value-row commentable",children:[f.jsx(ur,{target:o}),f.jsxs("div",{className:`value-head tinted ${t.status}`,children:[f.jsx("span",{className:"vname",children:t.name}),f.jsx("span",{className:"tag kind",children:e})]}),e==="ENUM 型"?f.jsx("div",{className:"chips",children:zl(t.status==="added"?void 0:n,t.status==="removed"?n:r).map(s=>f.jsxs("span",{className:`chip ${t.status==="modified"?s.status:"same"}`,children:[t.status==="modified"&&s.status==="added"?"+":s.status==="removed"&&t.status==="modified"?"−":"",s.value]},s.value))}):i&&f.jsx("div",{className:"domain",children:t.status==="modified"&&t.before&&t.after&&"type"in t.before&&"type"in t.after?f.jsxs("span",{className:"change-block",children:[f.jsxs("del",{children:[t.before.type,t.before.notNull?" NOT NULL":"",t.before.checks.map(s=>` ${s.definition}`).join("")]}),f.jsxs("ins",{children:[t.after.type,t.after.notNull?" NOT NULL":"",t.after.checks.map(s=>` ${s.definition}`).join("")]})]}):f.jsxs("code",{children:[i.type,i.notNull?" NOT NULL":"",i.checks.map(s=>` ${s.definition}`).join("")]})}),f.jsx(Dn,{target:o})]})}var Oe=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),xn=Oe((e,t)=>{var n=Object.defineProperty,r=(P,I,z)=>I in P?n(P,I,{enumerable:!0,configurable:!0,writable:!0,value:z}):P[I]=z,i=(P,I)=>()=>(I||P((I={exports:{}}).exports,I),I.exports),o=(P,I,z)=>r(P,typeof I!="symbol"?I+"":I,z),s=i((P,I)=>{var z="\0",B="\0",W="",M=class{constructor(O){o(this,"_isDirected",!0),o(this,"_isMultigraph",!1),o(this,"_isCompound",!1),o(this,"_label"),o(this,"_defaultNodeLabelFn",()=>{}),o(this,"_defaultEdgeLabelFn",()=>{}),o(this,"_nodes",{}),o(this,"_in",{}),o(this,"_preds",{}),o(this,"_out",{}),o(this,"_sucs",{}),o(this,"_edgeObjs",{}),o(this,"_edgeLabels",{}),o(this,"_nodeCount",0),o(this,"_edgeCount",0),o(this,"_parent"),o(this,"_children"),O&&(this._isDirected=Object.hasOwn(O,"directed")?O.directed:!0,this._isMultigraph=Object.hasOwn(O,"multigraph")?O.multigraph:!1,this._isCompound=Object.hasOwn(O,"compound")?O.compound:!1),this._isCompound&&(this._parent={},this._children={},this._children[B]={})}isDirected(){return this._isDirected}isMultigraph(){return this._isMultigraph}isCompound(){return this._isCompound}setGraph(O){return this._label=O,this}graph(){return this._label}setDefaultNodeLabel(O){return this._defaultNodeLabelFn=O,typeof O!="function"&&(this._defaultNodeLabelFn=()=>O),this}nodeCount(){return this._nodeCount}nodes(){return Object.keys(this._nodes)}sources(){var O=this;return this.nodes().filter(N=>Object.keys(O._in[N]).length===0)}sinks(){var O=this;return this.nodes().filter(N=>Object.keys(O._out[N]).length===0)}setNodes(O,N){var F=arguments,G=this;return O.forEach(function(Y){F.length>1?G.setNode(Y,N):G.setNode(Y)}),this}setNode(O,N){return Object.hasOwn(this._nodes,O)?(arguments.length>1&&(this._nodes[O]=N),this):(this._nodes[O]=arguments.length>1?N:this._defaultNodeLabelFn(O),this._isCompound&&(this._parent[O]=B,this._children[O]={},this._children[B][O]=!0),this._in[O]={},this._preds[O]={},this._out[O]={},this._sucs[O]={},++this._nodeCount,this)}node(O){return this._nodes[O]}hasNode(O){return Object.hasOwn(this._nodes,O)}removeNode(O){var N=this;if(Object.hasOwn(this._nodes,O)){var F=G=>N.removeEdge(N._edgeObjs[G]);delete this._nodes[O],this._isCompound&&(this._removeFromParentsChildList(O),delete this._parent[O],this.children(O).forEach(function(G){N.setParent(G)}),delete this._children[O]),Object.keys(this._in[O]).forEach(F),delete this._in[O],delete this._preds[O],Object.keys(this._out[O]).forEach(F),delete this._out[O],delete this._sucs[O],--this._nodeCount}return this}setParent(O,N){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(N===void 0)N=B;else{N+="";for(var F=N;F!==void 0;F=this.parent(F))if(F===O)throw new Error("Setting "+N+" as parent of "+O+" would create a cycle");this.setNode(N)}return this.setNode(O),this._removeFromParentsChildList(O),this._parent[O]=N,this._children[N][O]=!0,this}_removeFromParentsChildList(O){delete this._children[this._parent[O]][O]}parent(O){if(this._isCompound){var N=this._parent[O];if(N!==B)return N}}children(O=B){if(this._isCompound){var N=this._children[O];if(N)return Object.keys(N)}else{if(O===B)return this.nodes();if(this.hasNode(O))return[]}}predecessors(O){var N=this._preds[O];if(N)return Object.keys(N)}successors(O){var N=this._sucs[O];if(N)return Object.keys(N)}neighbors(O){var N=this.predecessors(O);if(N){let G=new Set(N);for(var F of this.successors(O))G.add(F);return Array.from(G.values())}}isLeaf(O){var N;return this.isDirected()?N=this.successors(O):N=this.neighbors(O),N.length===0}filterNodes(O){var N=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});N.setGraph(this.graph());var F=this;Object.entries(this._nodes).forEach(function([ee,D]){O(ee)&&N.setNode(ee,D)}),Object.values(this._edgeObjs).forEach(function(ee){N.hasNode(ee.v)&&N.hasNode(ee.w)&&N.setEdge(ee,F.edge(ee))});var G={};function Y(ee){var D=F.parent(ee);return D===void 0||N.hasNode(D)?(G[ee]=D,D):D in G?G[D]:Y(D)}return this._isCompound&&N.nodes().forEach(ee=>N.setParent(ee,Y(ee))),N}setDefaultEdgeLabel(O){return this._defaultEdgeLabelFn=O,typeof O!="function"&&(this._defaultEdgeLabelFn=()=>O),this}edgeCount(){return this._edgeCount}edges(){return Object.values(this._edgeObjs)}setPath(O,N){var F=this,G=arguments;return O.reduce(function(Y,ee){return G.length>1?F.setEdge(Y,ee,N):F.setEdge(Y,ee),ee}),this}setEdge(){var O,N,F,G,Y=!1,ee=arguments[0];typeof ee=="object"&&ee!==null&&"v"in ee?(O=ee.v,N=ee.w,F=ee.name,arguments.length===2&&(G=arguments[1],Y=!0)):(O=ee,N=arguments[1],F=arguments[3],arguments.length>2&&(G=arguments[2],Y=!0)),O=""+O,N=""+N,F!==void 0&&(F=""+F);var D=X(this._isDirected,O,N,F);if(Object.hasOwn(this._edgeLabels,D))return Y&&(this._edgeLabels[D]=G),this;if(F!==void 0&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(O),this.setNode(N),this._edgeLabels[D]=Y?G:this._defaultEdgeLabelFn(O,N,F);var te=Z(this._isDirected,O,N,F);return O=te.v,N=te.w,Object.freeze(te),this._edgeObjs[D]=te,K(this._preds[N],O),K(this._sucs[O],N),this._in[N][D]=te,this._out[O][D]=te,this._edgeCount++,this}edge(O,N,F){var G=arguments.length===1?_(this._isDirected,arguments[0]):X(this._isDirected,O,N,F);return this._edgeLabels[G]}edgeAsObj(){let O=this.edge(...arguments);return typeof O!="object"?{label:O}:O}hasEdge(O,N,F){var G=arguments.length===1?_(this._isDirected,arguments[0]):X(this._isDirected,O,N,F);return Object.hasOwn(this._edgeLabels,G)}removeEdge(O,N,F){var G=arguments.length===1?_(this._isDirected,arguments[0]):X(this._isDirected,O,N,F),Y=this._edgeObjs[G];return Y&&(O=Y.v,N=Y.w,delete this._edgeLabels[G],delete this._edgeObjs[G],S(this._preds[N],O),S(this._sucs[O],N),delete this._in[N][G],delete this._out[O][G],this._edgeCount--),this}inEdges(O,N){return this.isDirected()?this.filterEdges(this._in[O],O,N):this.nodeEdges(O,N)}outEdges(O,N){return this.isDirected()?this.filterEdges(this._out[O],O,N):this.nodeEdges(O,N)}nodeEdges(O,N){if(O in this._nodes)return this.filterEdges({...this._in[O],...this._out[O]},O,N)}filterEdges(O,N,F){if(O){var G=Object.values(O);return F?G.filter(function(Y){return Y.v===N&&Y.w===F||Y.v===F&&Y.w===N}):G}}};function K(O,N){O[N]?O[N]++:O[N]=1}function S(O,N){--O[N]||delete O[N]}function X(O,N,F,G){var Y=""+N,ee=""+F;if(!O&&Y>ee){var D=Y;Y=ee,ee=D}return Y+W+ee+W+(G===void 0?z:G)}function Z(O,N,F,G){var Y=""+N,ee=""+F;if(!O&&Y>ee){var D=Y;Y=ee,ee=D}var te={v:Y,w:ee};return G&&(te.name=G),te}function _(O,N){return X(O,N.v,N.w,N.name)}I.exports=M}),l=i((P,I)=>{I.exports="3.0.2"}),a=i((P,I)=>{I.exports={Graph:s(),version:l()}}),u=i((P,I)=>{var z=s();I.exports={write:B,read:K};function B(S){var X={options:{directed:S.isDirected(),multigraph:S.isMultigraph(),compound:S.isCompound()},nodes:W(S),edges:M(S)};return S.graph()!==void 0&&(X.value=structuredClone(S.graph())),X}function W(S){return S.nodes().map(function(X){var Z=S.node(X),_=S.parent(X),O={v:X};return Z!==void 0&&(O.value=Z),_!==void 0&&(O.parent=_),O})}function M(S){return S.edges().map(function(X){var Z=S.edge(X),_={v:X.v,w:X.w};return X.name!==void 0&&(_.name=X.name),Z!==void 0&&(_.value=Z),_})}function K(S){var X=new z(S.options).setGraph(S.value);return S.nodes.forEach(function(Z){X.setNode(Z.v,Z.value),Z.parent&&X.setParent(Z.v,Z.parent)}),S.edges.forEach(function(Z){X.setEdge({v:Z.v,w:Z.w,name:Z.name},Z.value)}),X}}),c=i((P,I)=>{I.exports=B;var z=()=>1;function B(M,K,S,X){return W(M,String(K),S||z,X||function(Z){return M.outEdges(Z)})}function W(M,K,S,X){var Z={},_=!0,O=0,N=M.nodes(),F=function(D){var te=S(D);Z[D.v].distance+te<Z[D.w].distance&&(Z[D.w]={distance:Z[D.v].distance+te,predecessor:D.v},_=!0)},G=function(){N.forEach(function(D){X(D).forEach(function(te){var ae=te.v===D?te.v:te.w,Fe=ae===te.v?te.w:te.v;F({v:ae,w:Fe})})})};N.forEach(function(D){var te=D===K?0:Number.POSITIVE_INFINITY;Z[D]={distance:te}});for(var Y=N.length,ee=1;ee<Y&&(_=!1,O++,G(),!!_);ee++);if(O===Y-1&&(_=!1,G(),_))throw new Error("The graph contains a negative weight cycle");return Z}}),d=i((P,I)=>{I.exports=z;function z(B){var W={},M=[],K;function S(X){Object.hasOwn(W,X)||(W[X]=!0,K.push(X),B.successors(X).forEach(S),B.predecessors(X).forEach(S))}return B.nodes().forEach(function(X){K=[],S(X),K.length&&M.push(K)}),M}}),h=i((P,I)=>{var z=class{constructor(){o(this,"_arr",[]),o(this,"_keyIndices",{})}size(){return this._arr.length}keys(){return this._arr.map(function(B){return B.key})}has(B){return Object.hasOwn(this._keyIndices,B)}priority(B){var W=this._keyIndices[B];if(W!==void 0)return this._arr[W].priority}min(){if(this.size()===0)throw new Error("Queue underflow");return this._arr[0].key}add(B,W){var M=this._keyIndices;if(B=String(B),!Object.hasOwn(M,B)){var K=this._arr,S=K.length;return M[B]=S,K.push({key:B,priority:W}),this._decrease(S),!0}return!1}removeMin(){this._swap(0,this._arr.length-1);var B=this._arr.pop();return delete this._keyIndices[B.key],this._heapify(0),B.key}decrease(B,W){var M=this._keyIndices[B];if(W>this._arr[M].priority)throw new Error("New priority is greater than current priority. Key: "+B+" Old: "+this._arr[M].priority+" New: "+W);this._arr[M].priority=W,this._decrease(M)}_heapify(B){var W=this._arr,M=2*B,K=M+1,S=B;M<W.length&&(S=W[M].priority<W[S].priority?M:S,K<W.length&&(S=W[K].priority<W[S].priority?K:S),S!==B&&(this._swap(B,S),this._heapify(S)))}_decrease(B){for(var W=this._arr,M=W[B].priority,K;B!==0&&(K=B>>1,!(W[K].priority<M));)this._swap(B,K),B=K}_swap(B,W){var M=this._arr,K=this._keyIndices,S=M[B],X=M[W];M[B]=X,M[W]=S,K[X.key]=B,K[S.key]=W}};I.exports=z}),p=i((P,I)=>{var z=h();I.exports=W;var B=()=>1;function W(K,S,X,Z){var _=function(O){return K.outEdges(O)};return M(K,String(S),X||B,Z||_)}function M(K,S,X,Z){var _={},O=new z,N,F,G=function(Y){var ee=Y.v!==N?Y.v:Y.w,D=_[ee],te=X(Y),ae=F.distance+te;if(te<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+Y+" Weight: "+te);ae<D.distance&&(D.distance=ae,D.predecessor=N,O.decrease(ee,ae))};for(K.nodes().forEach(function(Y){var ee=Y===S?0:Number.POSITIVE_INFINITY;_[Y]={distance:ee},O.add(Y,ee)});O.size()>0&&(N=O.removeMin(),F=_[N],F.distance!==Number.POSITIVE_INFINITY);)Z(N).forEach(G);return _}}),y=i((P,I)=>{var z=p();I.exports=B;function B(W,M,K){return W.nodes().reduce(function(S,X){return S[X]=z(W,X,M,K),S},{})}}),v=i((P,I)=>{I.exports=z;function z(W,M,K){if(W[M].predecessor!==void 0)throw new Error("Invalid source vertex");if(W[K].predecessor===void 0&&K!==M)throw new Error("Invalid destination vertex");return{weight:W[K].distance,path:B(W,M,K)}}function B(W,M,K){for(var S=[],X=K;X!==M;)S.push(X),X=W[X].predecessor;return S.push(M),S.reverse()}}),w=i((P,I)=>{I.exports=z;function z(B){var W=0,M=[],K={},S=[];function X(Z){var _=K[Z]={onStack:!0,lowlink:W,index:W++};if(M.push(Z),B.successors(Z).forEach(function(F){Object.hasOwn(K,F)?K[F].onStack&&(_.lowlink=Math.min(_.lowlink,K[F].index)):(X(F),_.lowlink=Math.min(_.lowlink,K[F].lowlink))}),_.lowlink===_.index){var O=[],N;do N=M.pop(),K[N].onStack=!1,O.push(N);while(Z!==N);S.push(O)}}return B.nodes().forEach(function(Z){Object.hasOwn(K,Z)||X(Z)}),S}}),x=i((P,I)=>{var z=w();I.exports=B;function B(W){return z(W).filter(function(M){return M.length>1||M.length===1&&W.hasEdge(M[0],M[0])})}}),m=i((P,I)=>{I.exports=B;var z=()=>1;function B(M,K,S){return W(M,K||z,S||function(X){return M.outEdges(X)})}function W(M,K,S){var X={},Z=M.nodes();return Z.forEach(function(_){X[_]={},X[_][_]={distance:0},Z.forEach(function(O){_!==O&&(X[_][O]={distance:Number.POSITIVE_INFINITY})}),S(_).forEach(function(O){var N=O.v===_?O.w:O.v,F=K(O);X[_][N]={distance:F,predecessor:_}})}),Z.forEach(function(_){var O=X[_];Z.forEach(function(N){var F=X[N];Z.forEach(function(G){var Y=F[_],ee=O[G],D=F[G],te=Y.distance+ee.distance;te<D.distance&&(D.distance=te,D.predecessor=ee.predecessor)})})}),X}}),g=i((P,I)=>{function z(W){var M={},K={},S=[];function X(Z){if(Object.hasOwn(K,Z))throw new B;Object.hasOwn(M,Z)||(K[Z]=!0,M[Z]=!0,W.predecessors(Z).forEach(X),delete K[Z],S.push(Z))}if(W.sinks().forEach(X),Object.keys(M).length!==W.nodeCount())throw new B;return S}var B=class extends Error{constructor(){super(...arguments)}};I.exports=z,z.CycleException=B}),k=i((P,I)=>{var z=g();I.exports=B;function B(W){try{z(W)}catch(M){if(M instanceof z.CycleException)return!1;throw M}return!0}}),C=i((P,I)=>{I.exports=z;function z(W,M,K,S,X){Array.isArray(M)||(M=[M]);var Z=(W.isDirected()?W.successors:W.neighbors).bind(W),_={};return M.forEach(function(O){if(!W.hasNode(O))throw new Error("Graph does not have node: "+O);X=B(W,O,K==="post",_,Z,S,X)}),X}function B(W,M,K,S,X,Z,_){return Object.hasOwn(S,M)||(S[M]=!0,K||(_=Z(_,M)),X(M).forEach(function(O){_=B(W,O,K,S,X,Z,_)}),K&&(_=Z(_,M))),_}}),E=i((P,I)=>{var z=C();I.exports=B;function B(W,M,K){return z(W,M,K,function(S,X){return S.push(X),S},[])}}),A=i((P,I)=>{var z=E();I.exports=B;function B(W,M){return z(W,M,"post")}}),T=i((P,I)=>{var z=E();I.exports=B;function B(W,M){return z(W,M,"pre")}}),L=i((P,I)=>{var z=s(),B=h();I.exports=W;function W(M,K){var S=new z,X={},Z=new B,_;function O(F){var G=F.v===_?F.w:F.v,Y=Z.priority(G);if(Y!==void 0){var ee=K(F);ee<Y&&(X[G]=_,Z.decrease(G,ee))}}if(M.nodeCount()===0)return S;M.nodes().forEach(function(F){Z.add(F,Number.POSITIVE_INFINITY),S.setNode(F)}),Z.decrease(M.nodes()[0],0);for(var N=!1;Z.size()>0;){if(_=Z.removeMin(),Object.hasOwn(X,_))S.setEdge(_,X[_]);else{if(N)throw new Error("Input graph is not connected: "+M);N=!0}M.nodeEdges(_).forEach(O)}return S}}),b=i((P,I)=>{var z=p(),B=c();I.exports=W;function W(K,S,X,Z){return M(K,S,X,Z||function(_){return K.outEdges(_)})}function M(K,S,X,Z){if(X===void 0)return z(K,S,X,Z);for(var _=!1,O=K.nodes(),N=0;N<O.length;N++){for(var F=Z(O[N]),G=0;G<F.length;G++){var Y=F[G],ee=Y.v===O[N]?Y.v:Y.w,D=ee===Y.v?Y.w:Y.v;X({v:ee,w:D})<0&&(_=!0)}if(_)return B(K,S,X,Z)}return z(K,S,X,Z)}}),R=i((P,I)=>{I.exports={bellmanFord:c(),components:d(),dijkstra:p(),dijkstraAll:y(),extractPath:v(),findCycles:x(),floydWarshall:m(),isAcyclic:k(),postorder:A(),preorder:T(),prim:L(),shortestPaths:b(),reduce:C(),tarjan:w(),topsort:g()}}),$=a();t.exports={Graph:$.Graph,json:u(),alg:R(),version:$.version}}),$0=Oe((e,t)=>{var n=class{constructor(){let o={};o._next=o._prev=o,this._sentinel=o}dequeue(){let o=this._sentinel,s=o._prev;if(s!==o)return r(s),s}enqueue(o){let s=this._sentinel;o._prev&&o._next&&r(o),o._next=s._next,s._next._prev=o,s._next=o,o._prev=s}toString(){let o=[],s=this._sentinel,l=s._prev;for(;l!==s;)o.push(JSON.stringify(l,i)),l=l._prev;return"["+o.join(", ")+"]"}};function r(o){o._prev._next=o._next,o._next._prev=o._prev,delete o._next,delete o._prev}function i(o,s){if(o!=="_next"&&o!=="_prev")return s}t.exports=n}),I0=Oe((e,t)=>{var n=xn().Graph,r=$0();t.exports=o;var i=()=>1;function o(d,h){if(d.nodeCount()<=1)return[];let p=a(d,h||i);return s(p.graph,p.buckets,p.zeroIdx).flatMap(y=>d.outEdges(y.v,y.w))}function s(d,h,p){let y=[],v=h[h.length-1],w=h[0],x;for(;d.nodeCount();){for(;x=w.dequeue();)l(d,h,p,x);for(;x=v.dequeue();)l(d,h,p,x);if(d.nodeCount()){for(let m=h.length-2;m>0;--m)if(x=h[m].dequeue(),x){y=y.concat(l(d,h,p,x,!0));break}}}return y}function l(d,h,p,y,v){let w=v?[]:void 0;return d.inEdges(y.v).forEach(x=>{let m=d.edge(x),g=d.node(x.v);v&&w.push({v:x.v,w:x.w}),g.out-=m,u(h,p,g)}),d.outEdges(y.v).forEach(x=>{let m=d.edge(x),g=x.w,k=d.node(g);k.in-=m,u(h,p,k)}),d.removeNode(y.v),w}function a(d,h){let p=new n,y=0,v=0;d.nodes().forEach(m=>{p.setNode(m,{v:m,in:0,out:0})}),d.edges().forEach(m=>{let g=p.edge(m.v,m.w)||0,k=h(m),C=g+k;p.setEdge(m.v,m.w,C),v=Math.max(v,p.node(m.v).out+=k),y=Math.max(y,p.node(m.w).in+=k)});let w=c(v+y+3).map(()=>new r),x=y+1;return p.nodes().forEach(m=>{u(w,x,p.node(m))}),{graph:p,buckets:w,zeroIdx:x}}function u(d,h,p){p.out?p.in?d[p.out-p.in+h].enqueue(p):d[d.length-1].enqueue(p):d[0].enqueue(p)}function c(d){let h=[];for(let p=0;p<d;p++)h.push(p);return h}}),tt=Oe((e,t)=>{var n=xn().Graph;t.exports={addBorderNode:h,addDummyNode:r,applyWithChunking:v,asNonCompoundGraph:o,buildLayerMatrix:u,intersectRect:a,mapValues:T,maxRank:w,normalizeRanks:c,notime:g,partition:x,pick:A,predecessorWeights:l,range:E,removeEmptyRanks:d,simplify:i,successorWeights:s,time:m,uniqueId:C,zipObject:L};function r(b,R,$,P){for(var I=P;b.hasNode(I);)I=C(P);return $.dummy=R,b.setNode(I,$),I}function i(b){let R=new n().setGraph(b.graph());return b.nodes().forEach($=>R.setNode($,b.node($))),b.edges().forEach($=>{let P=R.edge($.v,$.w)||{weight:0,minlen:1},I=b.edge($);R.setEdge($.v,$.w,{weight:P.weight+I.weight,minlen:Math.max(P.minlen,I.minlen)})}),R}function o(b){let R=new n({multigraph:b.isMultigraph()}).setGraph(b.graph());return b.nodes().forEach($=>{b.children($).length||R.setNode($,b.node($))}),b.edges().forEach($=>{R.setEdge($,b.edge($))}),R}function s(b){let R=b.nodes().map($=>{let P={};return b.outEdges($).forEach(I=>{P[I.w]=(P[I.w]||0)+b.edge(I).weight}),P});return L(b.nodes(),R)}function l(b){let R=b.nodes().map($=>{let P={};return b.inEdges($).forEach(I=>{P[I.v]=(P[I.v]||0)+b.edge(I).weight}),P});return L(b.nodes(),R)}function a(b,R){let $=b.x,P=b.y,I=R.x-$,z=R.y-P,B=b.width/2,W=b.height/2;if(!I&&!z)throw new Error("Not possible to find intersection inside of the rectangle");let M,K;return Math.abs(z)*B>Math.abs(I)*W?(z<0&&(W=-W),M=W*I/z,K=W):(I<0&&(B=-B),M=B,K=B*z/I),{x:$+M,y:P+K}}function u(b){let R=E(w(b)+1).map(()=>[]);return b.nodes().forEach($=>{let P=b.node($),I=P.rank;I!==void 0&&(R[I][P.order]=$)}),R}function c(b){let R=b.nodes().map(P=>{let I=b.node(P).rank;return I===void 0?Number.MAX_VALUE:I}),$=v(Math.min,R);b.nodes().forEach(P=>{let I=b.node(P);Object.hasOwn(I,"rank")&&(I.rank-=$)})}function d(b){let R=b.nodes().map(B=>b.node(B).rank).filter(B=>B!==void 0),$=v(Math.min,R),P=[];b.nodes().forEach(B=>{let W=b.node(B).rank-$;P[W]||(P[W]=[]),P[W].push(B)});let I=0,z=b.graph().nodeRankFactor;Array.from(P).forEach((B,W)=>{B===void 0&&W%z!==0?--I:B!==void 0&&I&&B.forEach(M=>b.node(M).rank+=I)})}function h(b,R,$,P){let I={width:0,height:0};return arguments.length>=4&&(I.rank=$,I.order=P),r(b,"border",I,R)}function p(b,R=y){let $=[];for(let P=0;P<b.length;P+=R){let I=b.slice(P,P+R);$.push(I)}return $}var y=65535;function v(b,R){if(R.length>y){let $=p(R);return b.apply(null,$.map(P=>b.apply(null,P)))}else return b.apply(null,R)}function w(b){let R=b.nodes().map($=>{let P=b.node($).rank;return P===void 0?Number.MIN_VALUE:P});return v(Math.max,R)}function x(b,R){let $={lhs:[],rhs:[]};return b.forEach(P=>{R(P)?$.lhs.push(P):$.rhs.push(P)}),$}function m(b,R){let $=Date.now();try{return R()}finally{console.log(b+" time: "+(Date.now()-$)+"ms")}}function g(b,R){return R()}var k=0;function C(b){var R=++k;return b+(""+R)}function E(b,R,$=1){R==null&&(R=b,b=0);let P=z=>z<R;$<0&&(P=z=>R<z);let I=[];for(let z=b;P(z);z+=$)I.push(z);return I}function A(b,R){let $={};for(let P of R)b[P]!==void 0&&($[P]=b[P]);return $}function T(b,R){let $=R;return typeof R=="string"&&($=P=>P[R]),Object.entries(b).reduce((P,[I,z])=>(P[I]=$(z,I),P),{})}function L(b,R){return b.reduce(($,P,I)=>($[P]=R[I],$),{})}}),L0=Oe((e,t)=>{var n=I0(),r=tt().uniqueId;t.exports={run:i,undo:s};function i(l){(l.graph().acyclicer==="greedy"?n(l,a(l)):o(l)).forEach(u=>{let c=l.edge(u);l.removeEdge(u),c.forwardName=u.name,c.reversed=!0,l.setEdge(u.w,u.v,c,r("rev"))});function a(u){return c=>u.edge(c).weight}}function o(l){let a=[],u={},c={};function d(h){Object.hasOwn(c,h)||(c[h]=!0,u[h]=!0,l.outEdges(h).forEach(p=>{Object.hasOwn(u,p.w)?a.push(p):d(p.w)}),delete u[h])}return l.nodes().forEach(d),a}function s(l){l.edges().forEach(a=>{let u=l.edge(a);if(u.reversed){l.removeEdge(a);let c=u.forwardName;delete u.reversed,delete u.forwardName,l.setEdge(a.w,a.v,u,c)}})}}),A0=Oe((e,t)=>{var n=tt();t.exports={run:r,undo:o};function r(s){s.graph().dummyChains=[],s.edges().forEach(l=>i(s,l))}function i(s,l){let a=l.v,u=s.node(a).rank,c=l.w,d=s.node(c).rank,h=l.name,p=s.edge(l),y=p.labelRank;if(d===u+1)return;s.removeEdge(l);let v,w,x;for(x=0,++u;u<d;++x,++u)p.points=[],w={width:0,height:0,edgeLabel:p,edgeObj:l,rank:u},v=n.addDummyNode(s,"edge",w,"_d"),u===y&&(w.width=p.width,w.height=p.height,w.dummy="edge-label",w.labelpos=p.labelpos),s.setEdge(a,v,{weight:p.weight},h),x===0&&s.graph().dummyChains.push(v),a=v;s.setEdge(a,c,{weight:p.weight},h)}function o(s){s.graph().dummyChains.forEach(l=>{let a=s.node(l),u=a.edgeLabel,c;for(s.setEdge(a.edgeObj,u);a.dummy;)c=s.successors(l)[0],s.removeNode(l),u.points.push({x:a.x,y:a.y}),a.dummy==="edge-label"&&(u.x=a.x,u.y=a.y,u.width=a.width,u.height=a.height),l=c,a=s.node(l)})}}),ul=Oe((e,t)=>{var{applyWithChunking:n}=tt();t.exports={longestPath:r,slack:i};function r(o){var s={};function l(a){var u=o.node(a);if(Object.hasOwn(s,a))return u.rank;s[a]=!0;let c=o.outEdges(a).map(h=>h==null?Number.POSITIVE_INFINITY:l(h.w)-o.edge(h).minlen);var d=n(Math.min,c);return d===Number.POSITIVE_INFINITY&&(d=0),u.rank=d}o.sources().forEach(l)}function i(o,s){return o.node(s.w).rank-o.node(s.v).rank-o.edge(s).minlen}}),Ty=Oe((e,t)=>{var n=xn().Graph,r=ul().slack;t.exports=i;function i(a){var u=new n({directed:!1}),c=a.nodes()[0],d=a.nodeCount();u.setNode(c,{});for(var h,p;o(u,a)<d;)h=s(u,a),p=u.hasNode(h.v)?r(a,h):-r(a,h),l(u,a,p);return u}function o(a,u){function c(d){u.nodeEdges(d).forEach(h=>{var p=h.v,y=d===p?h.w:p;!a.hasNode(y)&&!r(u,h)&&(a.setNode(y,{}),a.setEdge(d,y,{}),c(y))})}return a.nodes().forEach(c),a.nodeCount()}function s(a,u){return u.edges().reduce((c,d)=>{let h=Number.POSITIVE_INFINITY;return a.hasNode(d.v)!==a.hasNode(d.w)&&(h=r(u,d)),h<c[0]?[h,d]:c},[Number.POSITIVE_INFINITY,null])[1]}function l(a,u,c){a.nodes().forEach(d=>u.node(d).rank+=c)}}),O0=Oe((e,t)=>{var n=Ty(),r=ul().slack,i=ul().longestPath,o=xn().alg.preorder,s=xn().alg.postorder,l=tt().simplify;t.exports=a,a.initLowLimValues=h,a.initCutValues=u,a.calcCutValue=d,a.leaveEdge=y,a.enterEdge=v,a.exchangeEdges=w;function a(k){k=l(k),i(k);var C=n(k);h(C),u(C,k);for(var E,A;E=y(C);)A=v(C,k,E),w(C,k,E,A)}function u(k,C){var E=s(k,k.nodes());E=E.slice(0,E.length-1),E.forEach(A=>c(k,C,A))}function c(k,C,E){var A=k.node(E),T=A.parent;k.edge(E,T).cutvalue=d(k,C,E)}function d(k,C,E){var A=k.node(E),T=A.parent,L=!0,b=C.edge(E,T),R=0;return b||(L=!1,b=C.edge(T,E)),R=b.weight,C.nodeEdges(E).forEach($=>{var P=$.v===E,I=P?$.w:$.v;if(I!==T){var z=P===L,B=C.edge($).weight;if(R+=z?B:-B,m(k,E,I)){var W=k.edge(E,I).cutvalue;R+=z?-W:W}}}),R}function h(k,C){arguments.length<2&&(C=k.nodes()[0]),p(k,{},1,C)}function p(k,C,E,A,T){var L=E,b=k.node(A);return C[A]=!0,k.neighbors(A).forEach(R=>{Object.hasOwn(C,R)||(E=p(k,C,E,R,A))}),b.low=L,b.lim=E++,T?b.parent=T:delete b.parent,E}function y(k){return k.edges().find(C=>k.edge(C).cutvalue<0)}function v(k,C,E){var A=E.v,T=E.w;C.hasEdge(A,T)||(A=E.w,T=E.v);var L=k.node(A),b=k.node(T),R=L,$=!1;L.lim>b.lim&&(R=b,$=!0);var P=C.edges().filter(I=>$===g(k,k.node(I.v),R)&&$!==g(k,k.node(I.w),R));return P.reduce((I,z)=>r(C,z)<r(C,I)?z:I)}function w(k,C,E,A){var T=E.v,L=E.w;k.removeEdge(T,L),k.setEdge(A.v,A.w,{}),h(k),u(k,C),x(k,C)}function x(k,C){var E=k.nodes().find(T=>!C.node(T).parent),A=o(k,E);A=A.slice(1),A.forEach(T=>{var L=k.node(T).parent,b=C.edge(T,L),R=!1;b||(b=C.edge(L,T),R=!0),C.node(T).rank=C.node(L).rank+(R?b.minlen:-b.minlen)})}function m(k,C,E){return k.hasEdge(C,E)}function g(k,C,E){return E.low<=C.lim&&C.lim<=E.lim}}),R0=Oe((e,t)=>{var n=ul(),r=n.longestPath,i=Ty(),o=O0();t.exports=s;function s(c){var d=c.graph().ranker;if(d instanceof Function)return d(c);switch(c.graph().ranker){case"network-simplex":u(c);break;case"tight-tree":a(c);break;case"longest-path":l(c);break;case"none":break;default:u(c)}}var l=r;function a(c){r(c),i(c)}function u(c){o(c)}}),M0=Oe((e,t)=>{t.exports=n;function n(o){let s=i(o);o.graph().dummyChains.forEach(l=>{let a=o.node(l),u=a.edgeObj,c=r(o,s,u.v,u.w),d=c.path,h=c.lca,p=0,y=d[p],v=!0;for(;l!==u.w;){if(a=o.node(l),v){for(;(y=d[p])!==h&&o.node(y).maxRank<a.rank;)p++;y===h&&(v=!1)}if(!v){for(;p<d.length-1&&o.node(y=d[p+1]).minRank<=a.rank;)p++;y=d[p]}o.setParent(l,y),l=o.successors(l)[0]}})}function r(o,s,l,a){let u=[],c=[],d=Math.min(s[l].low,s[a].low),h=Math.max(s[l].lim,s[a].lim),p,y;p=l;do p=o.parent(p),u.push(p);while(p&&(s[p].low>d||h>s[p].lim));for(y=p,p=a;(p=o.parent(p))!==y;)c.push(p);return{path:u.concat(c.reverse()),lca:y}}function i(o){let s={},l=0;function a(u){let c=l;o.children(u).forEach(a),s[u]={low:c,lim:l++}}return o.children().forEach(a),s}}),P0=Oe((e,t)=>{var n=tt();t.exports={run:r,cleanup:l};function r(a){let u=n.addDummyNode(a,"root",{},"_root"),c=o(a),d=Object.values(c),h=n.applyWithChunking(Math.max,d)-1,p=2*h+1;a.graph().nestingRoot=u,a.edges().forEach(v=>a.edge(v).minlen*=p);let y=s(a)+1;a.children().forEach(v=>i(a,u,p,y,h,c,v)),a.graph().nodeRankFactor=p}function i(a,u,c,d,h,p,y){let v=a.children(y);if(!v.length){y!==u&&a.setEdge(u,y,{weight:0,minlen:c});return}let w=n.addBorderNode(a,"_bt"),x=n.addBorderNode(a,"_bb"),m=a.node(y);a.setParent(w,y),m.borderTop=w,a.setParent(x,y),m.borderBottom=x,v.forEach(g=>{i(a,u,c,d,h,p,g);let k=a.node(g),C=k.borderTop?k.borderTop:g,E=k.borderBottom?k.borderBottom:g,A=k.borderTop?d:2*d,T=C!==E?1:h-p[y]+1;a.setEdge(w,C,{weight:A,minlen:T,nestingEdge:!0}),a.setEdge(E,x,{weight:A,minlen:T,nestingEdge:!0})}),a.parent(y)||a.setEdge(u,w,{weight:0,minlen:h+p[y]})}function o(a){var u={};function c(d,h){var p=a.children(d);p&&p.length&&p.forEach(y=>c(y,h+1)),u[d]=h}return a.children().forEach(d=>c(d,1)),u}function s(a){return a.edges().reduce((u,c)=>u+a.edge(c).weight,0)}function l(a){var u=a.graph();a.removeNode(u.nestingRoot),delete u.nestingRoot,a.edges().forEach(c=>{var d=a.edge(c);d.nestingEdge&&a.removeEdge(c)})}}),F0=Oe((e,t)=>{var n=tt();t.exports=r;function r(o){function s(l){let a=o.children(l),u=o.node(l);if(a.length&&a.forEach(s),Object.hasOwn(u,"minRank")){u.borderLeft=[],u.borderRight=[];for(let c=u.minRank,d=u.maxRank+1;c<d;++c)i(o,"borderLeft","_bl",l,u,c),i(o,"borderRight","_br",l,u,c)}}o.children().forEach(s)}function i(o,s,l,a,u,c){let d={width:0,height:0,rank:c,borderType:s},h=u[s][c-1],p=n.addDummyNode(o,"border",d,l);u[s][c]=p,o.setParent(p,a),h&&o.setEdge(h,p,{weight:1})}}),D0=Oe((e,t)=>{t.exports={adjust:n,undo:r};function n(c){let d=c.graph().rankdir.toLowerCase();(d==="lr"||d==="rl")&&i(c)}function r(c){let d=c.graph().rankdir.toLowerCase();(d==="bt"||d==="rl")&&s(c),(d==="lr"||d==="rl")&&(a(c),i(c))}function i(c){c.nodes().forEach(d=>o(c.node(d))),c.edges().forEach(d=>o(c.edge(d)))}function o(c){let d=c.width;c.width=c.height,c.height=d}function s(c){c.nodes().forEach(d=>l(c.node(d))),c.edges().forEach(d=>{let h=c.edge(d);h.points.forEach(l),Object.hasOwn(h,"y")&&l(h)})}function l(c){c.y=-c.y}function a(c){c.nodes().forEach(d=>u(c.node(d))),c.edges().forEach(d=>{let h=c.edge(d);h.points.forEach(u),Object.hasOwn(h,"x")&&u(h)})}function u(c){let d=c.x;c.x=c.y,c.y=d}}),z0=Oe((e,t)=>{var n=tt();t.exports=r;function r(i){let o={},s=i.nodes().filter(d=>!i.children(d).length),l=s.map(d=>i.node(d).rank),a=n.applyWithChunking(Math.max,l),u=n.range(a+1).map(()=>[]);function c(d){if(o[d])return;o[d]=!0;let h=i.node(d);u[h.rank].push(d),i.successors(d).forEach(c)}return s.sort((d,h)=>i.node(d).rank-i.node(h).rank).forEach(c),u}}),B0=Oe((e,t)=>{var n=tt().zipObject;t.exports=r;function r(o,s){let l=0;for(let a=1;a<s.length;++a)l+=i(o,s[a-1],s[a]);return l}function i(o,s,l){let a=n(l,l.map((y,v)=>v)),u=s.flatMap(y=>o.outEdges(y).map(v=>({pos:a[v.w],weight:o.edge(v).weight})).sort((v,w)=>v.pos-w.pos)),c=1;for(;c<l.length;)c<<=1;let d=2*c-1;c-=1;let h=new Array(d).fill(0),p=0;return u.forEach(y=>{let v=y.pos+c;h[v]+=y.weight;let w=0;for(;v>0;)v%2&&(w+=h[v+1]),v=v-1>>1,h[v]+=y.weight;p+=y.weight*w}),p}}),U0=Oe((e,t)=>{t.exports=n;function n(r,i=[]){return i.map(o=>{let s=r.inEdges(o);if(s.length){let l=s.reduce((a,u)=>{let c=r.edge(u),d=r.node(u.v);return{sum:a.sum+c.weight*d.order,weight:a.weight+c.weight}},{sum:0,weight:0});return{v:o,barycenter:l.sum/l.weight,weight:l.weight}}else return{v:o}})}}),H0=Oe((e,t)=>{var n=tt();t.exports=r;function r(s,l){let a={};s.forEach((c,d)=>{let h=a[c.v]={indegree:0,in:[],out:[],vs:[c.v],i:d};c.barycenter!==void 0&&(h.barycenter=c.barycenter,h.weight=c.weight)}),l.edges().forEach(c=>{let d=a[c.v],h=a[c.w];d!==void 0&&h!==void 0&&(h.indegree++,d.out.push(a[c.w]))});let u=Object.values(a).filter(c=>!c.indegree);return i(u)}function i(s){let l=[];function a(c){return d=>{d.merged||(d.barycenter===void 0||c.barycenter===void 0||d.barycenter>=c.barycenter)&&o(c,d)}}function u(c){return d=>{d.in.push(c),--d.indegree===0&&s.push(d)}}for(;s.length;){let c=s.pop();l.push(c),c.in.reverse().forEach(a(c)),c.out.forEach(u(c))}return l.filter(c=>!c.merged).map(c=>n.pick(c,["vs","i","barycenter","weight"]))}function o(s,l){let a=0,u=0;s.weight&&(a+=s.barycenter*s.weight,u+=s.weight),l.weight&&(a+=l.barycenter*l.weight,u+=l.weight),s.vs=l.vs.concat(s.vs),s.barycenter=a/u,s.weight=u,s.i=Math.min(l.i,s.i),l.merged=!0}}),W0=Oe((e,t)=>{var n=tt();t.exports=r;function r(s,l){let a=n.partition(s,w=>Object.hasOwn(w,"barycenter")),u=a.lhs,c=a.rhs.sort((w,x)=>x.i-w.i),d=[],h=0,p=0,y=0;u.sort(o(!!l)),y=i(d,c,y),u.forEach(w=>{y+=w.vs.length,d.push(w.vs),h+=w.barycenter*w.weight,p+=w.weight,y=i(d,c,y)});let v={vs:d.flat(!0)};return p&&(v.barycenter=h/p,v.weight=p),v}function i(s,l,a){let u;for(;l.length&&(u=l[l.length-1]).i<=a;)l.pop(),s.push(u.vs),a++;return a}function o(s){return(l,a)=>l.barycenter<a.barycenter?-1:l.barycenter>a.barycenter?1:s?a.i-l.i:l.i-a.i}}),V0=Oe((e,t)=>{var n=U0(),r=H0(),i=W0();t.exports=o;function o(a,u,c,d){let h=a.children(u),p=a.node(u),y=p?p.borderLeft:void 0,v=p?p.borderRight:void 0,w={};y&&(h=h.filter(k=>k!==y&&k!==v));let x=n(a,h);x.forEach(k=>{if(a.children(k.v).length){let C=o(a,k.v,c,d);w[k.v]=C,Object.hasOwn(C,"barycenter")&&l(k,C)}});let m=r(x,c);s(m,w);let g=i(m,d);if(y&&(g.vs=[y,g.vs,v].flat(!0),a.predecessors(y).length)){let k=a.node(a.predecessors(y)[0]),C=a.node(a.predecessors(v)[0]);Object.hasOwn(g,"barycenter")||(g.barycenter=0,g.weight=0),g.barycenter=(g.barycenter*g.weight+k.order+C.order)/(g.weight+2),g.weight+=2}return g}function s(a,u){a.forEach(c=>{c.vs=c.vs.flatMap(d=>u[d]?u[d].vs:d)})}function l(a,u){a.barycenter!==void 0?(a.barycenter=(a.barycenter*a.weight+u.barycenter*u.weight)/(a.weight+u.weight),a.weight+=u.weight):(a.barycenter=u.barycenter,a.weight=u.weight)}}),G0=Oe((e,t)=>{var n=xn().Graph,r=tt();t.exports=i;function i(s,l,a,u){u||(u=s.nodes());let c=o(s),d=new n({compound:!0}).setGraph({root:c}).setDefaultNodeLabel(h=>s.node(h));return u.forEach(h=>{let p=s.node(h),y=s.parent(h);(p.rank===l||p.minRank<=l&&l<=p.maxRank)&&(d.setNode(h),d.setParent(h,y||c),s[a](h).forEach(v=>{let w=v.v===h?v.w:v.v,x=d.edge(w,h),m=x!==void 0?x.weight:0;d.setEdge(w,h,{weight:s.edge(v).weight+m})}),Object.hasOwn(p,"minRank")&&d.setNode(h,{borderLeft:p.borderLeft[l],borderRight:p.borderRight[l]}))}),d}function o(s){for(var l;s.hasNode(l=r.uniqueId("_root")););return l}}),K0=Oe((e,t)=>{t.exports=n;function n(r,i,o){let s={},l;o.forEach(a=>{let u=r.parent(a),c,d;for(;u;){if(c=r.parent(u),c?(d=s[c],s[c]=u):(d=l,l=u),d&&d!==u){i.setEdge(d,u);return}u=c}})}}),q0=Oe((e,t)=>{var n=z0(),r=B0(),i=V0(),o=G0(),s=K0(),l=xn().Graph,a=tt();t.exports=u;function u(p,y={}){if(typeof y.customOrder=="function"){y.customOrder(p,u);return}let v=a.maxRank(p),w=c(p,a.range(1,v+1),"inEdges"),x=c(p,a.range(v-1,-1,-1),"outEdges"),m=n(p);if(h(p,m),y.disableOptimalOrderHeuristic)return;let g=Number.POSITIVE_INFINITY,k,C=y.constraints||[];for(let E=0,A=0;A<4;++E,++A){d(E%2?w:x,E%4>=2,C),m=a.buildLayerMatrix(p);let T=r(p,m);T<g?(A=0,k=Object.assign({},m),g=T):T===g&&(k=structuredClone(m))}h(p,k)}function c(p,y,v){let w=new Map,x=(m,g)=>{w.has(m)||w.set(m,[]),w.get(m).push(g)};for(let m of p.nodes()){let g=p.node(m);if(typeof g.rank=="number"&&x(g.rank,m),typeof g.minRank=="number"&&typeof g.maxRank=="number")for(let k=g.minRank;k<=g.maxRank;k++)k!==g.rank&&x(k,m)}return y.map(function(m){return o(p,m,v,w.get(m)||[])})}function d(p,y,v){let w=new l;p.forEach(function(x){v.forEach(k=>w.setEdge(k.left,k.right));let m=x.graph().root,g=i(x,m,w,y);g.vs.forEach((k,C)=>x.node(k).order=C),s(x,w,g.vs)})}function h(p,y){Object.values(y).forEach(v=>v.forEach((w,x)=>p.node(w).order=x))}}),Y0=Oe((e,t)=>{var n=xn().Graph,r=tt();t.exports={positionX:v,findType1Conflicts:i,findType2Conflicts:o,addConflict:l,hasConflict:a,verticalAlignment:u,horizontalCompaction:c,alignCoordinates:p,findSmallestWidthAlignment:h,balance:y};function i(m,g){let k={};function C(E,A){let T=0,L=0,b=E.length,R=A[A.length-1];return A.forEach(($,P)=>{let I=s(m,$),z=I?m.node(I).order:b;(I||$===R)&&(A.slice(L,P+1).forEach(B=>{m.predecessors(B).forEach(W=>{let M=m.node(W),K=M.order;(K<T||z<K)&&!(M.dummy&&m.node(B).dummy)&&l(k,W,B)})}),L=P+1,T=z)}),A}return g.length&&g.reduce(C),k}function o(m,g){let k={};function C(A,T,L,b,R){let $;r.range(T,L).forEach(P=>{$=A[P],m.node($).dummy&&m.predecessors($).forEach(I=>{let z=m.node(I);z.dummy&&(z.order<b||z.order>R)&&l(k,I,$)})})}function E(A,T){let L=-1,b,R=0;return T.forEach(($,P)=>{if(m.node($).dummy==="border"){let I=m.predecessors($);I.length&&(b=m.node(I[0]).order,C(T,R,P,L,b),R=P,L=b)}C(T,R,T.length,b,A.length)}),T}return g.length&&g.reduce(E),k}function s(m,g){if(m.node(g).dummy)return m.predecessors(g).find(k=>m.node(k).dummy)}function l(m,g,k){if(g>k){let E=g;g=k,k=E}let C=m[g];C||(m[g]=C={}),C[k]=!0}function a(m,g,k){if(g>k){let C=g;g=k,k=C}return!!m[g]&&Object.hasOwn(m[g],k)}function u(m,g,k,C){let E={},A={},T={};return g.forEach(L=>{L.forEach((b,R)=>{E[b]=b,A[b]=b,T[b]=R})}),g.forEach(L=>{let b=-1;L.forEach(R=>{let $=C(R);if($.length){$=$.sort((I,z)=>T[I]-T[z]);let P=($.length-1)/2;for(let I=Math.floor(P),z=Math.ceil(P);I<=z;++I){let B=$[I];A[R]===R&&b<T[B]&&!a(k,R,B)&&(A[B]=R,A[R]=E[R]=E[B],b=T[B])}}})}),{root:E,align:A}}function c(m,g,k,C,E){let A={},T=d(m,g,k,E),L=E?"borderLeft":"borderRight";function b(P,I){let z=T.nodes().slice(),B={},W=z.pop();for(;W;){if(B[W])P(W);else{B[W]=!0,z.push(W);for(let M of I(W))z.push(M)}W=z.pop()}}function R(P){A[P]=T.inEdges(P).reduce((I,z)=>Math.max(I,A[z.v]+T.edge(z)),0)}function $(P){let I=T.outEdges(P).reduce((B,W)=>Math.min(B,A[W.w]-T.edge(W)),Number.POSITIVE_INFINITY),z=m.node(P);I!==Number.POSITIVE_INFINITY&&z.borderType!==L&&(A[P]=Math.max(A[P],I))}return b(R,T.predecessors.bind(T)),b($,T.successors.bind(T)),Object.keys(C).forEach(P=>A[P]=A[k[P]]),A}function d(m,g,k,C){let E=new n,A=m.graph(),T=w(A.nodesep,A.edgesep,C);return g.forEach(L=>{let b;L.forEach(R=>{let $=k[R];if(E.setNode($),b){var P=k[b],I=E.edge(P,$);E.setEdge(P,$,Math.max(T(m,R,b),I||0))}b=R})}),E}function h(m,g){return Object.values(g).reduce((k,C)=>{let E=Number.NEGATIVE_INFINITY,A=Number.POSITIVE_INFINITY;Object.entries(C).forEach(([L,b])=>{let R=x(m,L)/2;E=Math.max(b+R,E),A=Math.min(b-R,A)});let T=E-A;return T<k[0]&&(k=[T,C]),k},[Number.POSITIVE_INFINITY,null])[1]}function p(m,g){let k=Object.values(g),C=r.applyWithChunking(Math.min,k),E=r.applyWithChunking(Math.max,k);["u","d"].forEach(A=>{["l","r"].forEach(T=>{let L=A+T,b=m[L];if(b===g)return;let R=Object.values(b),$=C-r.applyWithChunking(Math.min,R);T!=="l"&&($=E-r.applyWithChunking(Math.max,R)),$&&(m[L]=r.mapValues(b,P=>P+$))})})}function y(m,g){return r.mapValues(m.ul,(k,C)=>{if(g)return m[g.toLowerCase()][C];{let E=Object.values(m).map(A=>A[C]).sort((A,T)=>A-T);return(E[1]+E[2])/2}})}function v(m){let g=r.buildLayerMatrix(m),k=Object.assign(i(m,g),o(m,g)),C={},E;["u","d"].forEach(T=>{E=T==="u"?g:Object.values(g).reverse(),["l","r"].forEach(L=>{L==="r"&&(E=E.map(P=>Object.values(P).reverse()));let b=(T==="u"?m.predecessors:m.successors).bind(m),R=u(m,E,k,b),$=c(m,E,R.root,R.align,L==="r");L==="r"&&($=r.mapValues($,P=>-P)),C[T+L]=$})});let A=h(m,C);return p(C,A),y(C,m.graph().align)}function w(m,g,k){return(C,E,A)=>{let T=C.node(E),L=C.node(A),b=0,R;if(b+=T.width/2,Object.hasOwn(T,"labelpos"))switch(T.labelpos.toLowerCase()){case"l":R=-T.width/2;break;case"r":R=T.width/2;break}if(R&&(b+=k?R:-R),R=0,b+=(T.dummy?g:m)/2,b+=(L.dummy?g:m)/2,b+=L.width/2,Object.hasOwn(L,"labelpos"))switch(L.labelpos.toLowerCase()){case"l":R=L.width/2;break;case"r":R=-L.width/2;break}return R&&(b+=k?R:-R),R=0,b}}function x(m,g){return m.node(g).width}}),X0=Oe((e,t)=>{var n=tt(),r=Y0().positionX;t.exports=i;function i(s){s=n.asNonCompoundGraph(s),o(s),Object.entries(r(s)).forEach(([l,a])=>s.node(l).x=a)}function o(s){let l=n.buildLayerMatrix(s),a=s.graph().ranksep,u=s.graph().rankalign,c=0;l.forEach(d=>{let h=d.reduce((p,y)=>{let v=s.node(y).height;return p>v?p:v},0);d.forEach(p=>{let y=s.node(p);u==="top"?y.y=c+y.height/2:u==="bottom"?y.y=c+h-y.height/2:y.y=c+h/2}),c+=h+a})}}),Q0=Oe((e,t)=>{var n=L0(),r=A0(),i=R0(),o=tt().normalizeRanks,s=M0(),l=tt().removeEmptyRanks,a=P0(),u=F0(),c=D0(),d=q0(),h=X0(),p=tt(),y=xn().Graph;t.exports=v;function v(N,F={}){let G=F.debugTiming?p.time:p.notime;return G("layout",()=>{let Y=G(" buildLayoutGraph",()=>b(N));return G(" runLayout",()=>w(Y,G,F)),G(" updateInputGraph",()=>x(N,Y)),Y})}function w(N,F,G){F(" makeSpaceForEdgeLabels",()=>R(N)),F(" removeSelfEdges",()=>S(N)),F(" acyclic",()=>n.run(N)),F(" nestingGraph.run",()=>a.run(N)),F(" rank",()=>i(p.asNonCompoundGraph(N))),F(" injectEdgeLabelProxies",()=>$(N)),F(" removeEmptyRanks",()=>l(N)),F(" nestingGraph.cleanup",()=>a.cleanup(N)),F(" normalizeRanks",()=>o(N)),F(" assignRankMinMax",()=>P(N)),F(" removeEdgeLabelProxies",()=>I(N)),F(" normalize.run",()=>r.run(N)),F(" parentDummyChains",()=>s(N)),F(" addBorderSegments",()=>u(N)),F(" order",()=>d(N,G)),F(" insertSelfEdges",()=>X(N)),F(" adjustCoordinateSystem",()=>c.adjust(N)),F(" position",()=>h(N)),F(" positionSelfEdges",()=>Z(N)),F(" removeBorderNodes",()=>K(N)),F(" normalize.undo",()=>r.undo(N)),F(" fixupEdgeLabelCoords",()=>W(N)),F(" undoCoordinateSystem",()=>c.undo(N)),F(" translateGraph",()=>z(N)),F(" assignNodeIntersects",()=>B(N)),F(" reversePoints",()=>M(N)),F(" acyclic.undo",()=>n.undo(N))}function x(N,F){N.nodes().forEach(G=>{let Y=N.node(G),ee=F.node(G);Y&&(Y.x=ee.x,Y.y=ee.y,Y.order=ee.order,Y.rank=ee.rank,F.children(G).length&&(Y.width=ee.width,Y.height=ee.height))}),N.edges().forEach(G=>{let Y=N.edge(G),ee=F.edge(G);Y.points=ee.points,Object.hasOwn(ee,"x")&&(Y.x=ee.x,Y.y=ee.y)}),N.graph().width=F.graph().width,N.graph().height=F.graph().height}var m=["nodesep","edgesep","ranksep","marginx","marginy"],g={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb",rankalign:"center"},k=["acyclicer","ranker","rankdir","align","rankalign"],C=["width","height","rank"],E={width:0,height:0},A=["minlen","weight","width","height","labeloffset"],T={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},L=["labelpos"];function b(N){let F=new y({multigraph:!0,compound:!0}),G=O(N.graph());return F.setGraph(Object.assign({},g,_(G,m),p.pick(G,k))),N.nodes().forEach(Y=>{let ee=O(N.node(Y)),D=_(ee,C);Object.keys(E).forEach(te=>{D[te]===void 0&&(D[te]=E[te])}),F.setNode(Y,D),F.setParent(Y,N.parent(Y))}),N.edges().forEach(Y=>{let ee=O(N.edge(Y));F.setEdge(Y,Object.assign({},T,_(ee,A),p.pick(ee,L)))}),F}function R(N){let F=N.graph();F.ranksep/=2,N.edges().forEach(G=>{let Y=N.edge(G);Y.minlen*=2,Y.labelpos.toLowerCase()!=="c"&&(F.rankdir==="TB"||F.rankdir==="BT"?Y.width+=Y.labeloffset:Y.height+=Y.labeloffset)})}function $(N){N.edges().forEach(F=>{let G=N.edge(F);if(G.width&&G.height){let Y=N.node(F.v),ee={rank:(N.node(F.w).rank-Y.rank)/2+Y.rank,e:F};p.addDummyNode(N,"edge-proxy",ee,"_ep")}})}function P(N){let F=0;N.nodes().forEach(G=>{let Y=N.node(G);Y.borderTop&&(Y.minRank=N.node(Y.borderTop).rank,Y.maxRank=N.node(Y.borderBottom).rank,F=Math.max(F,Y.maxRank))}),N.graph().maxRank=F}function I(N){N.nodes().forEach(F=>{let G=N.node(F);G.dummy==="edge-proxy"&&(N.edge(G.e).labelRank=G.rank,N.removeNode(F))})}function z(N){let F=Number.POSITIVE_INFINITY,G=0,Y=Number.POSITIVE_INFINITY,ee=0,D=N.graph(),te=D.marginx||0,ae=D.marginy||0;function Fe(Ce){let _e=Ce.x,ot=Ce.y,V=Ce.width,ne=Ce.height;F=Math.min(F,_e-V/2),G=Math.max(G,_e+V/2),Y=Math.min(Y,ot-ne/2),ee=Math.max(ee,ot+ne/2)}N.nodes().forEach(Ce=>Fe(N.node(Ce))),N.edges().forEach(Ce=>{let _e=N.edge(Ce);Object.hasOwn(_e,"x")&&Fe(_e)}),F-=te,Y-=ae,N.nodes().forEach(Ce=>{let _e=N.node(Ce);_e.x-=F,_e.y-=Y}),N.edges().forEach(Ce=>{let _e=N.edge(Ce);_e.points.forEach(ot=>{ot.x-=F,ot.y-=Y}),Object.hasOwn(_e,"x")&&(_e.x-=F),Object.hasOwn(_e,"y")&&(_e.y-=Y)}),D.width=G-F+te,D.height=ee-Y+ae}function B(N){N.edges().forEach(F=>{let G=N.edge(F),Y=N.node(F.v),ee=N.node(F.w),D,te;G.points?(D=G.points[0],te=G.points[G.points.length-1]):(G.points=[],D=ee,te=Y),G.points.unshift(p.intersectRect(Y,D)),G.points.push(p.intersectRect(ee,te))})}function W(N){N.edges().forEach(F=>{let G=N.edge(F);if(Object.hasOwn(G,"x"))switch((G.labelpos==="l"||G.labelpos==="r")&&(G.width-=G.labeloffset),G.labelpos){case"l":G.x-=G.width/2+G.labeloffset;break;case"r":G.x+=G.width/2+G.labeloffset;break}})}function M(N){N.edges().forEach(F=>{let G=N.edge(F);G.reversed&&G.points.reverse()})}function K(N){N.nodes().forEach(F=>{if(N.children(F).length){let G=N.node(F),Y=N.node(G.borderTop),ee=N.node(G.borderBottom),D=N.node(G.borderLeft[G.borderLeft.length-1]),te=N.node(G.borderRight[G.borderRight.length-1]);G.width=Math.abs(te.x-D.x),G.height=Math.abs(ee.y-Y.y),G.x=D.x+G.width/2,G.y=Y.y+G.height/2}}),N.nodes().forEach(F=>{N.node(F).dummy==="border"&&N.removeNode(F)})}function S(N){N.edges().forEach(F=>{if(F.v===F.w){var G=N.node(F.v);G.selfEdges||(G.selfEdges=[]),G.selfEdges.push({e:F,label:N.edge(F)}),N.removeEdge(F)}})}function X(N){var F=p.buildLayerMatrix(N);F.forEach(G=>{var Y=0;G.forEach((ee,D)=>{var te=N.node(ee);te.order=D+Y,(te.selfEdges||[]).forEach(ae=>{p.addDummyNode(N,"selfedge",{width:ae.label.width,height:ae.label.height,rank:te.rank,order:D+ ++Y,e:ae.e,label:ae.label},"_se")}),delete te.selfEdges})})}function Z(N){N.nodes().forEach(F=>{var G=N.node(F);if(G.dummy==="selfedge"){var Y=N.node(G.e.v),ee=Y.x+Y.width/2,D=Y.y,te=G.x-ee,ae=Y.height/2;N.setEdge(G.e,G.label),N.removeNode(F),G.label.points=[{x:ee+2*te/3,y:D-ae},{x:ee+5*te/6,y:D-ae},{x:ee+te,y:D},{x:ee+5*te/6,y:D+ae},{x:ee+2*te/3,y:D+ae}],G.label.x=G.x,G.label.y=G.y}})}function _(N,F){return p.mapValues(p.pick(N,F),Number)}function O(N){var F={};return N&&Object.entries(N).forEach(([G,Y])=>{typeof G=="string"&&(G=G.toLowerCase()),F[G]=Y}),F}}),Z0=Oe((e,t)=>{var n=tt(),r=xn().Graph;t.exports={debugOrdering:i};function i(o){let s=n.buildLayerMatrix(o),l=new r({compound:!0,multigraph:!0}).setGraph({});return o.nodes().forEach(a=>{l.setNode(a,{label:a}),l.setParent(a,"layer"+o.node(a).rank)}),o.edges().forEach(a=>l.setEdge(a.v,a.w,{},a.name)),s.forEach((a,u)=>{let c="layer"+u;l.setNode(c,{rank:"same"}),a.reduce((d,h)=>(l.setEdge(d,h,{style:"invis"}),h))}),l}}),J0=Oe((e,t)=>{t.exports="2.0.4"}),eb=Oe((e,t)=>{t.exports={graphlib:xn(),layout:Q0(),debug:Z0(),util:{time:tt().time,notime:tt().notime},version:J0()}});const Ep=eb();/*! For license information please see dagre.esm.js.LEGAL.txt */const pi=28,Cr=20,$y=20,_a=10,tb=150;function nb(e,t){if(t==="all")return e.map(o=>({table:o,neighbor:!1}));const n=e.filter(o=>o.status!=="unchanged"),r=new Set(n.map(o=>o.name)),i=new Set;for(const o of n)for(const s of o.foreignKeys)r.has(s.table)||i.add(s.table);return e.filter(o=>r.has(o.name)||i.has(o.name)).map(o=>({table:o,neighbor:i.has(o.name)}))}function rb(e,t,n){const r=new Set(e.foreignKeys.flatMap(l=>l.columns)),i=l=>n||l.status!=="unchanged"||l.primary||r.has(l.name)||l.values||t.has(l.name),o=e.columns.filter(i).map(l=>({kind:"column",column:l,fk:r.has(l.name)})),s=e.columns.length-o.length;return s>0&&o.push({kind:"more",hidden:s}),o}function ib(e){const t=[];return e.otherChanges.constraints&&t.push(`制約 ${e.otherChanges.constraints}`),e.otherChanges.indexes&&t.push(`インデックス ${e.otherChanges.indexes}`),e.otherChanges.comment&&t.push("コメント"),t.length?`${t.join("・")} の変更`:void 0}function Iy(e){return{name:e.name,type:e.beforeType?`${e.beforeType} → ${e.type}`:e.type}}function ob(e,t,n,r){const i=nb(e,t),o=new Set(i.map(v=>v.table.name)),s=new Map;for(const{table:v}of i)for(const w of v.foreignKeys){if(!o.has(w.table))continue;const x=s.get(w.table)??new Set;w.refColumns.forEach(m=>x.add(m)),s.set(w.table,x)}const l=new Ep.graphlib.Graph({compound:!0,multigraph:!0});l.setGraph({rankdir:"LR",nodesep:28,ranksep:90,marginx:20,marginy:20}),l.setDefaultEdgeLabel(()=>({}));const a=i.map(({table:v,neighbor:w})=>{const x=rb(v,s.get(v.name)??new Set,n.has(v.name)),m=ib(v);let g=Math.max(tb,r(v.name,!0)+_a*2+24);for(const C of x){if(C.kind==="more")continue;const E=Iy(C.column);g=Math.max(g,18+r(E.name)+16+r(E.type)+34+_a*2)}m&&(g=Math.max(g,r(m)+_a*2));const k=pi+x.length*Cr+(m?$y:0)+4;return{table:v,neighbor:w,rows:x,footer:m,x:0,y:0,width:Math.ceil(g),height:k}}),u=[...new Set(a.map(v=>v.table.schema))];for(const v of u)l.setNode(`schema:${v}`,{label:v,paddingTop:26});for(const v of a)l.setNode(v.table.name,{width:v.width,height:v.height}),l.setParent(v.table.name,`schema:${v.table.schema}`);const c=[];for(const v of a)for(const w of v.table.foreignKeys){if(!o.has(w.table))continue;const x=a.find(g=>g.table.name===w.table),m=(g,k)=>!!k&&g.rows.some(C=>C.kind==="column"&&C.column.name===k);c.push({fk:w,from:v.table.name,to:w.table,fromColumn:m(v,w.columns[0])?w.columns[0]:void 0,toColumn:m(x,w.refColumns[0])?w.refColumns[0]:void 0,points:[]}),w.table!==v.table.name&&l.setEdge(v.table.name,w.table,{},w.name)}Ep.layout(l);for(const v of a){const w=l.node(v.table.name);v.x=w.x-v.width/2,v.y=w.y-v.height/2}const d=u.map(v=>{const w=l.node(`schema:${v}`);return{schema:v,x:w.x-w.width/2,y:w.y-w.height/2,width:w.width,height:w.height}}),h=new Map(a.map(v=>[v.table.name,v]));for(const v of c)v.points=sb(h.get(v.from),v.fromColumn,h.get(v.to),v.toColumn);const p=Math.max(0,...a.map(v=>v.x+v.width),...d.map(v=>v.x+v.width)),y=Math.max(0,...a.map(v=>v.y+v.height),...d.map(v=>v.y+v.height));return{tables:a,edges:c,groups:d,width:p+20,height:y+20}}function Sp(e,t){const n=t?e.rows.findIndex(r=>r.kind==="column"&&r.column.name===t):-1;return n<0?e.y+pi/2:e.y+pi+n*Cr+Cr/2}function sb(e,t,n,r){const i=Sp(e,t),o=Sp(n,r);if(e===n){const d=e.x+e.width;return[{x:d,y:i},{x:d+28,y:i},{x:d+28,y:o},{x:d,y:o}]}const s=e.x+e.width/2,a=n.x+n.width/2>=s,u=a?e.x+e.width:e.x,c=a?n.x:n.x+n.width;return[{x:u,y:i},{x:c,y:o}]}function lb(e){if(e.length!==2)return`M ${e.map(i=>`${i.x} ${i.y}`).join(" L ")}`;const[t,n]=e,r=Math.max(30,Math.abs(n.x-t.x)/2)*(n.x>=t.x?1:-1);return`M ${t.x} ${t.y} C ${t.x+r} ${t.y}, ${n.x-r} ${n.y}, ${n.x} ${n.y}`}const ab={added:"+",removed:"−",modified:"~",unchanged:""},Ly="12px ui-monospace, SFMono-Regular, Menlo, monospace",ub=`600 ${Ly}`;function cb(){return U.useMemo(()=>{const e=document.createElement("canvas").getContext("2d");return(t,n)=>e?(e.font=n?ub:Ly,e.measureText(t).width):t.length*7.4},[])}const db=U.forwardRef(function({tables:t,mode:n,values:r,selected:i,reviewed:o,comments:s,onSelect:l},a){const u=cb(),[c,d]=U.useState(new Set),[h,p]=U.useState(null),[y,v]=U.useState({x:0,y:0,k:1}),w=U.useRef(null),x=U.useRef(null),m=U.useMemo(()=>ob(t,n,c,u),[t,n,c,u]),g=U.useMemo(()=>new Map(m.tables.map(L=>[L.table.name,L])),[m]),k=U.useRef(!1),C=U.useCallback(()=>{const L=w.current;if(!L||m.width===0)return;if(L.clientWidth===0||L.clientHeight===0){k.current=!0;return}k.current=!1;const b=Math.min(1.2,Math.max(.2,Math.min(L.clientWidth/m.width,L.clientHeight/m.height)));v({k:b,x:(L.clientWidth-m.width*b)/2,y:Math.max(0,(L.clientHeight-m.height*b)/2)})},[m]),E=m.tables.map(L=>L.table.name).join("|");U.useEffect(()=>{C()},[E]),U.useEffect(()=>{const L=w.current;if(!L)return;const b=new ResizeObserver(()=>{k.current&&C()});return b.observe(L),()=>b.disconnect()},[C]);const A=U.useCallback((L,b,R)=>{v($=>{const P=Math.min(3,Math.max(.15,$.k*L));return{k:P,x:b-(b-$.x)*P/$.k,y:R-(R-$.y)*P/$.k}})},[]);U.useImperativeHandle(a,()=>({fit:C,zoom:L=>{const b=w.current;b&&A(L,b.clientWidth/2,b.clientHeight/2)},focus:L=>{const b=g.get(L),R=w.current;!b||!R||v($=>({...$,x:R.clientWidth/2-(b.x+b.width/2)*$.k,y:R.clientHeight/3-(b.y+Math.min(b.height,200)/2)*$.k}))}}),[C,A,g]),U.useEffect(()=>{const L=w.current;if(!L)return;const b=R=>{R.preventDefault();const $=L.getBoundingClientRect();R.ctrlKey||R.metaKey?A(Math.exp(-R.deltaY*.01),R.clientX-$.left,R.clientY-$.top):v(P=>({...P,x:P.x-R.deltaX,y:P.y-R.deltaY}))};return L.addEventListener("wheel",b,{passive:!1}),()=>L.removeEventListener("wheel",b)},[A]);const T=L=>h===L||i===L;return f.jsx("div",{ref:w,className:"er",onPointerDown:L=>{L.button===0&&(x.current={x:L.clientX,y:L.clientY,vx:y.x,vy:y.y,moved:!1,target:L.target},L.currentTarget.setPointerCapture(L.pointerId))},onPointerMove:L=>{const b=x.current;b&&(Math.abs(L.clientX-b.x)+Math.abs(L.clientY-b.y)>3&&(b.moved=!0),b.moved&&v(R=>({...R,x:b.vx+L.clientX-b.x,y:b.vy+L.clientY-b.y})))},onPointerUp:()=>{const L=x.current;if(x.current=null,L&&!L.moved){const b=L.target.closest("[data-table]"),R=L.target.closest("[data-more]");if(R){const $=R.getAttribute("data-more");d(P=>{const I=new Set(P);return I.has($)?I.delete($):I.add($),I})}else l(b?b.getAttribute("data-table"):null)}},children:m.tables.length===0?f.jsx("div",{className:"er-empty",children:"表示するテーブルはありません"}):f.jsxs("svg",{width:"100%",height:"100%",children:[f.jsx("defs",{children:["added","removed","modified","unchanged"].map(L=>f.jsx("marker",{id:`arrow-${L}`,viewBox:"0 0 10 10",refX:"9",refY:"5",markerWidth:"7",markerHeight:"7",orient:"auto-start-reverse",children:f.jsx("path",{d:"M0,0 L10,5 L0,10 z",className:`arrow ${L}`})},L))}),f.jsxs("g",{transform:`translate(${y.x} ${y.y}) scale(${y.k})`,children:[m.groups.map(L=>f.jsxs("g",{className:"er-group",children:[f.jsx("rect",{x:L.x,y:L.y,width:L.width,height:L.height,rx:8}),f.jsx("text",{x:L.x+10,y:L.y+17,children:L.schema})]},L.schema)),m.edges.map(L=>{const b=T(L.from)||T(L.to);return f.jsx("path",{d:lb(L.points),className:`er-edge ${L.fk.status} ${b?"lit":""} ${h||i?b?"":"dim":""}`,markerEnd:`url(#arrow-${L.fk.status})`,children:f.jsxs("title",{children:[L.fk.name,": ",L.from,".",L.fk.columns.join(", ")," → ",L.to,".",L.fk.refColumns.join(", ")]})},`${L.from}:${L.fk.name}`)}),m.tables.map(L=>f.jsx(fb,{t:L,values:r,selected:i===L.table.name,reviewed:o.has(L.table.name),comments:s.tables.get(L.table.name)??0,commented:s.columns,expanded:c.has(L.table.name),onHover:p},L.table.name))]})]})})});function fb({t:e,values:t,selected:n,reviewed:r,comments:i,commented:o,expanded:s,onHover:l}){const a=e.table.status;return f.jsxs("g",{className:`er-table ${a} ${e.neighbor?"neighbor":""} ${n?"selected":""} ${r?"reviewed":""}`,"data-table":e.table.name,transform:`translate(${e.x} ${e.y})`,onPointerEnter:()=>l(e.table.name),onPointerLeave:()=>l(null),children:[f.jsx("rect",{className:"er-box",width:e.width,height:e.height,rx:6}),f.jsx("rect",{className:"er-head",width:e.width,height:pi,rx:6}),f.jsx("rect",{className:"er-head-fill",y:pi-6,width:e.width,height:6}),f.jsxs("text",{className:"er-title",x:10,y:18,children:[f.jsxs("tspan",{className:"er-schema",children:[e.table.schema,"."]}),f.jsx("tspan",{children:e.table.table})]}),r&&f.jsx("text",{className:"er-check",x:e.width-(i>0?24:10),y:18,textAnchor:"end",children:"✓"}),e.rows.map((u,c)=>{const d=pi+c*Cr;if(u.kind==="more")return f.jsxs("g",{className:"er-more","data-more":e.table.name,children:[f.jsx("rect",{y:d,width:e.width,height:Cr}),f.jsx("text",{x:10,y:d+14,children:s?"▴ たたむ":`▸ 他 ${u.hidden} カラム`})]},"more");const h=u.column,p=Iy(h),y=t.get(`${e.table.name}.${h.name}`);return f.jsxs("g",{className:`er-row ${h.status}`,children:[f.jsx("rect",{y:d,width:e.width,height:Cr}),f.jsx("text",{x:8,y:d+14,className:`er-mark ${h.status}`,children:ab[h.status]}),f.jsxs("text",{x:20,y:d+14,className:"er-col",children:[h.primary&&f.jsx("tspan",{className:"er-key",children:"◆ "}),p.name]}),f.jsxs("text",{x:e.width-10,y:d+14,textAnchor:"end",className:"er-type",children:[u.fk&&f.jsx("tspan",{className:"er-fk",children:"FK "}),h.values&&f.jsx("tspan",{className:"er-values",children:"値± "}),h.beforeType?f.jsxs(f.Fragment,{children:[f.jsx("tspan",{className:"er-before",children:h.beforeType}),f.jsxs("tspan",{children:[" → ",h.type]})]}):h.type,h.notNull?"":f.jsx("tspan",{className:"er-null",children:"?"})]}),o.has(`${e.table.name}.${h.name}`)&&f.jsx("circle",{className:"er-cdot",cx:e.width-4,cy:d+Cr/2,r:2.5}),y&&f.jsx("title",{children:y})]},h.name)}),i>0&&f.jsxs("g",{className:"er-cbadge",transform:`translate(${e.width-4} 0)`,children:[f.jsxs("title",{children:["コメント ",i," 件"]}),f.jsx("rect",{x:-17,y:-9,width:34,height:18,rx:9}),f.jsx(_i,{size:10,x:-11,y:-5}),f.jsx("text",{x:4,y:4,textAnchor:"middle",children:i})]}),e.footer&&f.jsx("text",{className:"er-footer",x:10,y:e.height-$y/2-1,children:e.footer})]})}const oi={side:260,panel:440},Cp=180,Np=320,jp=320,Ay="dbshape.layout";function pb(){const e=jn(Ay,{});return{side:typeof e.side=="number"&&e.side>0?e.side:oi.side,panel:typeof e.panel=="number"&&e.panel>0?e.panel:oi.panel}}const us=e=>hn(Ay,e);function cs(e,t,n){const r=Mr*(n?2:1);let i=e.panel;n&&(i=Math.max(jp,Math.min(i,t-r-Cp-Np)));const o=t-r-(n?i:0);return{side:Math.max(Cp,Math.min(e.side,o-Np)),panel:Math.max(jp,i)}}function hb(e,t){return[`${e.side}px`,`${Mr}px`,"minmax(0, 1fr)",...t?[`${Mr}px`,`${e.panel}px`]:[]].join(" ")}const Oy="dbshape.reviewed:",mb=e=>jn(Oy+e,{}),gb=(e,t)=>hn(Oy+e,t),yb=e=>`${e.repoRoot}|${e.base.label}|${e.target.label}|${e.database.id}`,xb=[{status:"added",title:"新規テーブル"},{status:"modified",title:"変更したテーブル"},{status:"removed",title:"削除したテーブル"}];function vb({data:e,active:t,onComments:n,switcher:r}){const i=yb(e),[o,s]=U.useState(""),[l,a]=U.useState("changes"),[u,c]=U.useState(null),[d,h]=U.useState(()=>mb(i)),[p,y]=U.useState(()=>g0(i)),[v,w]=U.useState(null),[x,m]=U.useState(null),g=U.useRef(null),k=U.useRef(null),C=U.useRef(null),E=dy(k),[A,T]=U.useState(pb);U.useEffect(()=>{if(!t)return;const D=te=>{te.key==="Escape"&&!(te.target instanceof HTMLElement&&te.target.closest("textarea, input"))&&c(null)};return window.addEventListener("keydown",D),()=>window.removeEventListener("keydown",D)},[t]),U.useEffect(()=>{const D=p.filter(te=>fi(e,te)!=="resolved").length;n({open:D,prompt:()=>wy(e,p,{header:!1}).text})},[e,p,n]);const L=e.diff.tables,b=U.useMemo(()=>new Set(L.map(D=>D.name)),[L]),R=D=>d[D.name]===so(D),$=U.useMemo(()=>new Set(L.filter(D=>d[D.name]===so(D)).map(D=>D.name)),[L,d]),P=U.useMemo(()=>{const D=new Map;for(const te of e.diff.values){const ae=zl(te.before,te.after).map(Ce=>Ce.status==="added"?`+${Ce.value}`:Ce.status==="removed"?`−${Ce.value}`:Ce.value).join(" "),Fe=te.source==="check"?[`${te.table}.${te.column}`]:te.usedBy??[];for(const Ce of Fe)D.set(Ce,`値: ${ae}`)}return D},[e]),I=U.useMemo(()=>{const D=new Map,te=new Set;for(const ae of p)fi(e,ae)==="resolved"||!ae.target.table||(D.set(ae.target.table,(D.get(ae.target.table)??0)+1),(ae.target.kind==="column"||ae.target.kind==="value")&&te.add(`${ae.target.table}.${ae.target.name}`));return{tables:D,columns:te}},[e,p]),z=e.diff,B=(D,te)=>{const ae={...d};te?ae[D.name]=so(D):delete ae[D.name],h(ae),gb(i,ae)},W=(D,te=!0)=>{c({kind:"table",name:D}),te&&window.setTimeout(()=>{var ae;return(ae=g.current)==null?void 0:ae.focus(D)},0)},M=D=>{y(D),y0(i,D)},K={data:e,comments:p,composing:v,editing:x,compose:D=>{w(D?Ei(D):null),m(null)},edit:D=>{m(D),w(null)},add:(D,te)=>{M([...p,h0(e,D,te)]),w(null)},update:(D,te)=>{M(p.map(ae=>ae.id===D?{...ae,body:te}:ae)),m(null)},remove:D=>M(p.filter(te=>te.id!==D))},S=D=>{D.table?W(D.table):c({kind:"type",name:D.name}),window.setTimeout(()=>{var te;return(te=document.getElementById(`c-${Ei(D)}`))==null?void 0:te.scrollIntoView({block:"center",behavior:"smooth"})},50)},X=L.filter(D=>u0(D,o)),Z=[...z.enums.map(D=>({kind:"ENUM 型",change:D})),...z.domains.map(D=>({kind:"DOMAIN",change:D}))],_=L.filter(R).length,O=u,N=(O==null?void 0:O.kind)==="table"?L.find(D=>D.name===O.name):void 0,F=(O==null?void 0:O.kind)==="table"?e.er.find(D=>D.name===O.name):void 0,G=(O==null?void 0:O.kind)==="table"?z.values.filter(D=>{var te;return D.table===O.name||((te=D.usedBy)==null?void 0:te.some(ae=>ae.startsWith(`${O.name}.`)))}):[],Y=(O==null?void 0:O.kind)==="type"?Z.find(D=>D.change.name===O.name):void 0,ee=L.length===0&&z.values.length===0&&Z.length===0;return f.jsx(by.Provider,{value:K,children:f.jsxs("div",{className:"app",children:[f.jsxs(Nd,{children:[r,f.jsxs(jd,{children:[f.jsx(bi,{children:"テーブル"}),f.jsx(Dl,{stats:{added:L.filter(D=>D.status==="added").length,modified:L.filter(D=>D.status==="modified").length,removed:L.filter(D=>D.status==="removed").length},unit:"テーブル",showZero:!0}),f.jsx(_d,{}),f.jsx(bi,{children:"値の変化"}),f.jsx("span",{className:`vcount${z.values.length?"":" zero"}`,title:"CHECK や ENUM などの値の変化",children:z.values.length})]}),f.jsx(Td,{}),f.jsx($d,{done:_,total:L.length,title:"確認済みにしたテーブル(内容が変わると外れます)"})]}),f.jsxs("div",{className:`body ${O?"with-panel":""}`,ref:k,style:{gridTemplateColumns:hb(E?cs(A,E,!!O):A,!!O)},children:[f.jsxs("nav",{className:"side",ref:C,children:[f.jsx("input",{className:"filter",placeholder:"テーブル・カラムで絞り込み",value:o,onChange:D=>s(D.target.value)}),xb.map(D=>{const te=X.filter(ae=>ae.status===D.status);return f.jsxs("div",{className:"group",children:[f.jsxs("div",{className:"group-title",children:[D.title," ",f.jsx("span",{className:"muted",children:te.length})]}),te.map(ae=>{const Fe=yy(ae),Ce=I.tables.get(ae.name)??0,_e=R(ae);return f.jsxs("div",{className:`item-row tinted ${ae.status}${_e?" reviewed":""}${(O==null?void 0:O.name)===ae.name?" current":""}`,children:[f.jsxs("button",{className:"item",onClick:()=>W(ae.name),title:ae.name,children:[f.jsxs("span",{className:"iname",children:[f.jsxs("span",{className:"schema",children:[ae.schema,"."]}),ae.table]}),f.jsx(Ti,{stats:Fe,title:gy(Fe)}),Ce>0&&f.jsx(Io,{n:Ce,title:"このテーブルへの未対応のコメント"})]}),f.jsx("button",{className:`ireview${_e?" on":""}`,onClick:()=>B(ae,!_e),title:_e?"確認済み(クリックで外す)":"確認済みにする(テーブルがまた変わると外れます)","aria-label":_e?"確認済みを外す":"確認済みにする","aria-pressed":_e,children:f.jsx(Yu,{size:12})})]},ae.name)})]},D.status)}),f.jsxs("div",{className:"group",children:[f.jsxs("div",{className:"group-title",children:["値の変化 ",f.jsx("span",{className:"muted",children:z.values.length})]}),z.values.map((D,te)=>{const ae=xy(D);return f.jsx("button",{className:"item tinted values",onClick:()=>ae.table?W(ae.table):D.type&&c({kind:"type",name:D.type}),children:f.jsx("span",{className:"iname",children:ae.label})},te)})]}),p.length>0&&f.jsxs("div",{className:"group",children:[f.jsxs("div",{className:"group-title",children:["コメント ",f.jsx("span",{className:"muted",children:p.length})]}),p.map(D=>{const te=fi(e,D);return f.jsxs("div",{className:`item comment-item ${te}`,role:"button",tabIndex:0,onClick:()=>S(D.target),onKeyDown:ae=>ae.key==="Enter"&&S(D.target),title:`${ec(D.target)}
|
|
66
|
+
${D.body}`,children:[f.jsx("span",{className:"mark cmark",children:f.jsx(_i,{size:12})}),f.jsxs("span",{className:"iname",children:[f.jsx("span",{className:"ctarget",children:ec(D.target)}),f.jsx("span",{className:"cline",children:D.body.split(`
|
|
67
|
+
`)[0]})]}),te!=="open"&&f.jsx("span",{className:`cstate ${te}`,children:x0[te]}),f.jsx("button",{className:"cdel","aria-label":"削除",title:"このコメントを削除",onClick:ae=>{ae.stopPropagation(),K.remove(D.id)},children:"×"})]},D.id)})]}),Z.length>0&&f.jsxs("div",{className:"group",children:[f.jsxs("div",{className:"group-title",children:["型 ",f.jsx("span",{className:"muted",children:Z.length})]}),Z.map(D=>f.jsx("button",{className:`item tinted ${D.change.status}${(O==null?void 0:O.name)===D.change.name?" current":""}`,onClick:()=>c({kind:"type",name:D.change.name}),children:f.jsx("span",{className:"iname",children:D.change.name})},D.change.name))]}),f.jsxs("div",{className:"side-foot muted",children:[f.jsxs("div",{children:["変更のないテーブル ",z.unchangedTables]}),f.jsxs("details",{children:[f.jsxs("summary",{children:["スキーマ ",e.target.files.length," ファイル(",Id(e.schemaFrom),")"]}),f.jsx("ul",{children:e.target.files.map(D=>f.jsx("li",{children:D},D))})]}),e.ignored.length>0&&f.jsxs("details",{children:[f.jsxs("summary",{children:["比較していない文 ",e.ignored.reduce((D,te)=>D+te.count,0)]}),f.jsx("ul",{children:e.ignored.map(D=>f.jsxs("li",{children:[D.statement," ",D.count]},D.statement))})]})]})]}),f.jsx($o,{title:"ドラッグで一覧と図の幅を変える(ダブルクリックで元に戻す)",start:()=>{var D;return((D=C.current)==null?void 0:D.getBoundingClientRect().width)??A.side},onDrag:(D,te)=>T(ae=>cs({...ae,side:D+te},E,!!O)),onEnd:()=>T(D=>(us(D),D)),onReset:()=>T(D=>(us({...D,side:oi.side}),{...D,side:oi.side}))}),f.jsxs("main",{className:"canvas",children:[f.jsxs("div",{className:"toolbar",children:[f.jsxs("div",{className:"ds-seg",children:[f.jsx("button",{className:l==="changes"?"on":"",onClick:()=>a("changes"),title:"変更したテーブルと、その外部キーの参照先だけ",children:"変更まわり"}),f.jsx("button",{className:l==="all"?"on":"",onClick:()=>a("all"),title:"すべてのテーブル",children:"全体"})]}),f.jsx("button",{className:"ds-btn",onClick:()=>{var D;return(D=g.current)==null?void 0:D.fit()},title:"図全体を画面に収める",children:"全体を表示"}),f.jsx("button",{className:"ds-btn ds-btn-icon",onClick:()=>{var D;return(D=g.current)==null?void 0:D.zoom(1.25)},"aria-label":"拡大",children:"+"}),f.jsx("button",{className:"ds-btn ds-btn-icon",onClick:()=>{var D;return(D=g.current)==null?void 0:D.zoom(.8)},"aria-label":"縮小",children:"−"}),f.jsx("span",{className:"muted hint",title:"スクロールでも移動できます。トラックパッドのピンチでも拡大縮小できます",children:"ドラッグで移動・⌘ / Ctrl + スクロールで拡大・クリックで詳細"})]}),e.warnings.length>0&&f.jsx("div",{className:"warnings",children:e.warnings.map((D,te)=>f.jsx("div",{className:"warning",children:D},te))}),ee&&l==="changes"?f.jsxs("div",{className:"empty",children:["スキーマの変更はありません(",e.target.files.length," ファイルを比較しました)"]}):f.jsx(db,{ref:g,tables:e.er,mode:l,values:P,selected:(O==null?void 0:O.kind)==="table"?O.name:null,reviewed:$,comments:I,onSelect:D=>D?W(D,!1):c(null)})]}),O&&f.jsx($o,{title:"ドラッグで図と詳細パネルの幅を変える(ダブルクリックで元に戻す)",start:()=>cs(A,E,!0).panel,onDrag:(D,te)=>T(ae=>cs({...ae,panel:D-te},E,!0)),onEnd:()=>T(D=>(us(D),D)),onReset:()=>T(D=>(us({...D,panel:oi.panel}),{...D,panel:oi.panel}))}),O&&f.jsx(N0,{selection:O,change:N,erTable:F,values:G,type:Y,reviewed:N?R(N):!1,onReviewed:D=>N&&B(N,D),known:b,onJump:D=>W(D),onClose:()=>c(null)})]})]})})}function wb({data:e,active:t,onComments:n}){const r=e.databases,i=r.length>1,o=`dbshape.database:${e.repoRoot}`,[s,l]=U.useState(()=>{var w;const v=jn(o,null);return v&&r.some(x=>x.database.id===v)?v:(w=[...r].sort((x,m)=>Ls(m)-Ls(x))[0])==null?void 0:w.database.id}),a=r.find(v=>v.database.id===s)??r[0],u=v=>{l(v),hn(o,v)},[c,d]=U.useState({}),h=U.useRef(new Map),p=v=>{let w=h.current.get(v);return w||h.current.set(v,w=x=>d(m=>({...m,[v]:x}))),w};if(U.useEffect(()=>{const v=r.filter(w=>{var x;return(((x=c[w.database.id])==null?void 0:x.open)??0)>0});n({open:v.reduce((w,x)=>w+c[x.database.id].open,0),prompt:()=>v.map(w=>{const x=c[w.database.id].prompt().trimEnd();return i?`### DB: ${w.database.name}
|
|
68
|
+
|
|
69
|
+
${x}`:x}).join(`
|
|
70
|
+
|
|
71
|
+
`)})},[r,c,i,n]),!a)return f.jsx("div",{className:"fatal muted",children:"スキーマの SQL ファイルがありません"});const y=i?f.jsx("div",{className:"db-switch",role:"tablist","aria-label":"データベース",children:r.map(v=>{const w=Ls(v),x=v===a;return f.jsxs("button",{role:"tab","aria-selected":x,className:`db-tab ${x?"on":""} ${w===0?"quiet":""}`,onClick:()=>u(v.database.id),title:`${Id(v.schemaFrom)}
|
|
72
|
+
変更 ${w}`,children:[f.jsx("span",{className:"db-name",children:v.database.name}),f.jsx("span",{className:"db-count",children:w})]},v.database.id)})}):void 0;return f.jsx(f.Fragment,{children:r.map(v=>f.jsx("div",{className:"db-pane",hidden:v!==a,children:f.jsx(vb,{data:v,active:t&&v===a,onComments:p(v.database.id),switcher:y})},v.database.id))})}const kb={id:"db",title:"DB",description:"DB スキーマ(dbshape): テーブル・カラム・制約・CHECK の値の変化",icon:n0,View:wb,badge:e=>e.databases.reduce((t,n)=>t+Ls(n),0)||void 0};function bb(e){const t=new Map,n=new Map;for(const l of e.files){n.set(l.path,l);const a=t.get(l.dir)??[];a.push(l),t.set(l.dir,a)}const r=new Map,i=new Map;for(const l of e.edges)_p(r,l.from,l),_p(i,l.to,l);const o=[...t.keys()].sort(),s=new Set;for(const l of e.files)l.status!=="unchanged"&&s.add(l.dir);return{graph:e,filesByDir:t,edgesByFrom:r,edgesByTo:i,fileByPath:n,dirs:o,changedDirs:[...s].sort()}}function _p(e,t,n){const r=e.get(t);r?r.push(n):e.set(t,[n])}function cl(e,t){return e===0&&t>0?"added":t===0&&e>0?"removed":"unchanged"}function Ry(e,t){let n;for(const r of e)(r.dir===""||t===r.dir||t.startsWith(r.dir+"/"))&&(!n||r.dir.length>n.dir.length)&&(n=r);return n}function My(e,t,n){const r=Ry(e,t);if(!r||r.dir==="")return t||"(root)";const i=t===r.dir?".":t.slice(r.dir.length+1);return`${r.dir.split("/").pop()}:${i}`}function Le(e){const t=e.lastIndexOf("/");return t===-1?"":e.slice(0,t)}function ft(e){return e.slice(e.lastIndexOf("/")+1)}function Eb(e){const t=new Map,n=r=>{let i=t.get(r);return i||(i={path:r,name:r===""?"(root)":ft(r),dirs:[],files:[],stats:{added:0,modified:0,removed:0,total:0}},t.set(r,i),r!==""&&n(Le(r)).dirs.push(i),i)};n("");for(const r of e.graph.files){n(r.dir).files.push(r);let i=r.dir;for(;i!==null;){const o=n(i);o.stats.total++,r.status!=="unchanged"&&o.stats[r.status]++,i=i===""?null:Le(i)}}for(const r of t.values())r.dirs.sort((i,o)=>i.name.localeCompare(o.name)),r.files.sort((i,o)=>i.path.localeCompare(o.path));return{root:n(""),byPath:t}}function Os(e){const t=[];let n=e;for(;n!=="";)n=Le(n),n!==""&&t.unshift(n);return t}function dl(e){return e.added+e.modified+e.removed===0?"unchanged":e.added===e.total?"added":e.removed===e.total?"removed":"modified"}const Sb=e=>`t:${e}`;function Ta(e){if(e.length===0)return"";const t=e.map(r=>Le(r)?Le(r).split("/"):[]),n=[];for(let r=0;;r++){const i=t[0][r];if(i===void 0||t.some(o=>o[r]!==i))break;n.push(i)}return n.join("/")}function Py(e){return[...e.files,...e.dirs.flatMap(Py)]}function _r(e,t,n,r){const i=n.slice(2);if(n.startsWith("f:")){const o=e.fileByPath.get(i);return o?{id:n,kind:"file",label:`${ft(o.dir)}/${ft(o.path)}`,path:i,status:o.status,files:[o],pinned:r,depth:0}:null}if(n.startsWith("d:")){const o=t.get(i);return o?{id:n,kind:"dir",label:`${o.name}/`,path:i,status:dl(o.stats),files:Py(o),pinned:r,scope:i,depth:0}:null}if(n.startsWith("r:")){const o=t.get(i);if(!o)return null;const s=o.files.filter(l=>l.status==="unchanged");return{id:n,kind:"rest",label:`${o.name}/`,suffix:` のほか ${s.length} ファイル`,path:i,status:"unchanged",files:s,pinned:r,depth:0}}if(n.startsWith("c:")){const o=t.get(i);return o?{id:n,kind:"container",label:`${o.name}/`,path:i,status:"unchanged",files:o.files,pinned:r,depth:0}:null}if(n.startsWith("p:")){const o=t.get(i);if(!o)return null;const s={added:0,modified:0,removed:0,total:o.files.length};for(const l of o.files)l.status!=="unchanged"&&s[l.status]++;return{id:n,kind:"package",label:o.name,suffix:"(パッケージ)",path:i,status:dl(s),files:o.files,pinned:r,depth:0}}return null}const un=(e,t)=>t===""||e===t||e.startsWith(t+"/");function Od(e,t,n){const r=[];for(const i of t.files)for(const o of e.edgesByFrom.get(i.path)??[])o.external&&!n||t.scope!==void 0&&!o.external&&un(o.to,t.scope)||r.push(o);return r}const fl=(e,t)=>({from:e,to:t,before:0,after:0,added:0,removed:0,status:"unchanged"});function Tp(e,t){t!=="added"&&e.before++,t!=="removed"&&e.after++,t==="added"&&e.added++,t==="removed"&&e.removed++}function Fy(e,t){if(!t)return;const n=new Map((e.files??[]).map(r=>[r.path,r]));for(const r of t){const i=n.get(r.path);i?(i.status!==r.status&&(i.status="unchanged"),r.typeOnly||delete i.typeOnly):n.set(r.path,{...r})}e.files=[...n.values()].sort((r,i)=>r.path.localeCompare(i.path))}function pl(e,t,n){const r=new Map;for(const i of Od(e,t,n)){const o=i.external?`x:${i.to}`:`d:${i.to}`;let s=r.get(o);s||(s={target:{id:o,dir:i.to,label:i.external?i.to:My(e.graph.modules,i.to),external:i.external},link:fl(t.id,o),fileLinks:new Map},r.set(o,s));const l=s.link;Tp(l,i.status),i.typeOnly!==void 0&&(l.typeOnly=(l.typeOnly??!0)&&i.typeOnly);for(const a of i.files??[]){const u=Sb(a.path);let c=s.fileLinks.get(u);c||s.fileLinks.set(u,c=fl(t.id,u)),Tp(c,a.status),c.typeOnly=(c.typeOnly??!0)&&!!a.typeOnly}Fy(l,i.files)}for(const{link:i,fileLinks:o}of r.values()){i.status=cl(i.before,i.after);for(const s of o.values())s.status=cl(s.before,s.after),s.typeOnly||delete s.typeOnly}return r}function Dy(e,t,n,r=`g:${n}`){const i=fl(t.id,r),o=new Map;let s=!0;for(const l of Od(e,t,!1)){if(l.external||!un(l.to,n))continue;const a=o.get(l.from)??{before:!1,after:!1};l.status!=="added"&&(a.before=!0),l.status!=="removed"&&(a.after=!0),o.set(l.from,a),s&&(s=l.typeOnly===!0),Fy(i,l.files)}if(o.size===0)return null;for(const l of o.values())l.before&&i.before++,l.after&&i.after++,!l.before&&l.after&&i.added++,l.before&&!l.after&&i.removed++;return i.status=cl(i.before,i.after),s&&(i.typeOnly=!0),i}function Cb(e,t,n,r){const i=s=>{const l=_r(e,t,s,n.pinned);return l?(l.scope=n.scope??l.scope,l.kind==="file"&&(l.label=ft(l.path)),l):null};let o=[];if(n.kind==="dir"){const s=t.get(n.path);if(!s)return[];o=[...s.dirs.map(l=>i(`d:${l.path}`)),...s.files.map(l=>i(`f:${l.path}`))]}else(n.kind==="rest"||n.kind==="package")&&(o=n.files.map(s=>i(`f:${s.path}`)));return o.filter(s=>s!==null&&Od(e,s,r).length>0)}function Xi(e,t){const n=new Set(t.files.map(o=>o.path)),r=new Set(t.files.map(o=>o.dir)),i=new Map;for(const o of e.graph.edges){if(o.external||n.has(o.from)||t.scope!==void 0&&un(Le(o.from),t.scope))continue;let s;if(o.files){const a=o.files.filter(u=>n.has(u.path));if(!a.length)continue;s={before:a.some(u=>u.status!=="added"),after:a.some(u=>u.status!=="removed"),typeOnly:a.every(u=>!!u.typeOnly)}}else{if(!r.has(o.to))continue;s={before:o.status!=="added",after:o.status!=="removed",typeOnly:!1}}const l=i.get(o.from);l?(l.before||(l.before=s.before),l.after||(l.after=s.after),l.typeOnly&&(l.typeOnly=s.typeOnly)):i.set(o.from,s)}return i}function zy(e,t,n){if(!n.length)return null;const r=fl(e,t);for(const i of n)i.before&&r.before++,i.after&&r.after++,!i.before&&i.after&&r.added++,i.before&&!i.after&&r.removed++;return r.status=cl(r.before,r.after),n.every(i=>i.typeOnly)&&(r.typeOnly=!0),r}function nc(e){const t=e.slice(4);return e.startsWith("i:f:")?n=>n===t:e.startsWith("i:d:")?n=>Le(n)===t:n=>un(Le(n),t)}function Nb(e,t,n,r){var s,l;if(n.startsWith("i:")){const a=_r(e,t,r,!1);if(!a)return null;const u=a.kind==="container"?{...a,files:a.files.filter(d=>d.path.endsWith(".go"))}:a,c=nc(n);return zy(n,r,[...Xi(e,u)].filter(([d])=>c(d)).map(([,d])=>d))}const i=_r(e,t,n,!1);if(!i)return null;if(r.startsWith("g:"))return Dy(e,i,r.slice(2),r);const o=pl(e,i,!0);return r.startsWith("t:")?((l=o.get(`d:${Le(r.slice(2))}`))==null?void 0:l.fileLinks.get(r))??null:((s=o.get(r))==null?void 0:s.link)??null}function $p(e,t){const n={dir:t,target:!1,children:new Map},r=e.includes(t);for(const s of e){if(s===t)continue;let l=n;for(const a of(t?s.slice(t.length+1):s).split("/")){const u=l.dir?`${l.dir}/${a}`:a;let c=l.children.get(a);c||l.children.set(a,c={dir:u,target:!1,children:new Map}),l=c}l.target=!0}const i=(s,l)=>{const a=[...s.children.values()];if(!s.target&&a.length===1)return i(a[0],`${l}/${ft(a[0].dir)}`);if(a.length===0)return[{kind:"dir",dir:s.dir,label:l,self:!1}];const u=a.flatMap(c=>i(c,ft(c.dir)));return s.target&&u.push({kind:"dir",dir:s.dir,label:`${ft(s.dir)}(パッケージ)`,self:!0}),[{kind:"group",dir:s.dir,label:l,children:u}]},o=[...n.children.values()].flatMap(s=>i(s,ft(s.dir)));return r&&o.push({kind:"dir",dir:t,label:t?`${ft(t)}(パッケージ)`:"(ルート)",self:!0}),o}function jb(e,t,n,r,i,o=new Map,s=new Map){var ot;const l=[],a=new Set,u=(V,ne,oe)=>{if(a.has(V.id))return;a.add(V.id);const he=V.kind==="file"?[]:Cb(e,t,V,i);if(Object.assign(V,{depth:ne,parent:oe,canOpen:he.length>0,open:he.length>0&&(s.get(V.id)??!1)}),l.push(V),V.open)for(const me of he)u(me,ne+1,V.id)},c=n.map(V=>_r(e,t,V,!0)).filter(V=>V!==null);for(const V of c)V.isPin=!0;const d=new Map,h=new Map;for(const V of c)V.kind==="file"&&d.set(Le(V.path),[...d.get(Le(V.path))??[],V]);const p=[...c.filter(V=>V.kind!=="file").map(V=>({key:`${V.path}/`,box:!1,s:V,dir:V.path})),...[...d.keys()].map(V=>({key:V?`${V}/`:"",box:!0,s:null,dir:V}))].sort((V,ne)=>V.key.localeCompare(ne.key)||Number(V.box)-Number(ne.box));for(const V of p){if(!V.box){u(V.s,0,void 0);continue}const ne=d.get(V.dir).filter(de=>!a.has(de.id)).sort((de,Te)=>de.path.localeCompare(Te.path)),oe=ne.length?_r(e,t,`c:${V.dir}`,!0):null;if(!oe)continue;const he=oe.files;oe.files=ne.flatMap(de=>de.files);const me={added:0,modified:0,removed:0,total:oe.files.length};for(const de of oe.files)de.status!=="unchanged"&&me[de.status]++;if(oe.status=dl(me),a.add(oe.id),oe.depth=0,oe.canOpen=!0,oe.open=s.get(oe.id)??!0,oe.open||(oe.suffix=` ${ne.length} ファイル`),l.push(oe),h.set(oe.id,{files:ne,pkg:he}),oe.open)for(const de of ne)de.label=ft(de.path),u(de,1,oe.id)}if(r&&!n.includes(r)){const V=_r(e,t,r,!1);V&&u(V,0,void 0)}const y=l.filter(V=>V.depth===0),v=Ta(y.map(V=>V.path));for(const V of y){const ne=v?V.path.slice(v.length+1):V.path;V.label=V.kind==="dir"||V.kind==="rest"||V.kind==="container"?`${ne}/`:ne}const w=l.map(V=>V.open?new Map:pl(e,V,i)),x=new Set,m=new Map;for(const V of w)for(const{target:ne}of V.values())ne.external?m.set(ne.id,ne):x.add(ne.dir);const g=Ta([...x]),k=V=>g?V.slice(g.length+1):V,C=V=>{let ne=0,oe=0;return w.forEach((he,me)=>{for(const de of he.keys())V(de)&&(ne+=me,oe++)}),oe?ne/oe:0},E=V=>C(ne=>ne.startsWith("d:")&&(V.kind==="group"?un(ne.slice(2),V.dir):ne.slice(2)===V.dir)),A=V=>[...V].sort((ne,oe)=>{const he=ne.kind==="dir"&&ne.self?1:0,me=oe.kind==="dir"&&oe.self?1:0;return he-me||E(ne)-E(oe)||ne.label.localeCompare(oe.label)}),T=[],L=[],b=V=>{const ne=w.flatMap(oe=>{var he;return[...((he=oe.get(V))==null?void 0:he.fileLinks.values())??[]]});return{fileLinks:ne,files:[...new Set(ne.map(oe=>oe.to))]}},R=(V,ne,oe)=>{var q;if(V.kind==="group"){const H=`g:${V.dir}`,J=o.get(H)??!0,ce=[...x].filter(we=>we!==V.dir&&un(we,V.dir)).length,ue=x.has(V.dir)?b(`d:${V.dir}`).files.length:0,ve=x.has(V.dir)&&ue===0;if(T.push({id:H,kind:"group",dir:V.dir,label:V.label,fullLabel:k(V.dir),external:!1,depth:ne,parent:oe,canOpen:!0,open:J,folderCount:ce+(ve?1:0),directFileCount:ue}),J)for(const we of A(V.children))R(we,ne+1,H);else for(const we of l){if(we.open)continue;const Ne=Dy(e,we,V.dir,H);Ne&&L.push(Ne)}return}const he=`d:${V.dir}`,{fileLinks:me,files:de}=b(he),Te=H=>C(J=>J===he&&w.some(ce=>{var ue;return(ue=ce.get(J))==null?void 0:ue.fileLinks.has(H)})),nt=(H,J)=>{de.sort((ce,ue)=>Te(ce)-Te(ue)||ce.localeCompare(ue));for(const ce of de){const ue=ce.slice(2);T.push({id:ce,kind:"file",dir:V.dir,label:ft(ue),fullLabel:k(ue),external:!1,depth:H,parent:J,file:ue})}L.push(...me)};if(V.self&&de.length>0){nt(ne,oe);return}const Xe=de.length>0&&(o.get(he)??!1);if(T.push({id:he,kind:"dir",dir:V.dir,label:V.label,fullLabel:V.self?`${k(V.dir)}(パッケージ)`:k(V.dir),external:!1,depth:ne,parent:oe,self:V.self,canOpen:de.length>0,open:Xe,fileCount:de.length}),!Xe){for(const H of w){const J=(q=H.get(he))==null?void 0:q.link;J&&L.push(J)}return}nt(ne+1,he)};for(const V of A($p([...x],g)))R(V,0,void 0);const $=[...m.values()].sort((V,ne)=>C(oe=>oe===V.id)-C(oe=>oe===ne.id)||V.label.localeCompare(ne.label));for(const V of $){T.push({id:V.id,kind:"external",dir:V.dir,label:V.label,fullLabel:V.label,external:!0,depth:0});for(const ne of w){const oe=(ot=ne.get(V.id))==null?void 0:ot.link;oe&&L.push(oe)}}const P=(V,ne)=>{var oe;return ne.startsWith("t:")?!!((oe=V.get(`d:${Le(ne.slice(2))}`))!=null&&oe.fileLinks.has(ne)):ne.startsWith("g:")?[...V.keys()].some(he=>he.startsWith("d:")&&un(he.slice(2),ne.slice(2))):V.has(ne)},I=new Map,z=V=>{let ne=I.get(V.id);return ne||I.set(V.id,ne=pl(e,V,i)),ne};for(const V of L){const ne=h.get(V.from);ne&&(V.keys=ne.files.filter(oe=>P(z(oe),V.to)).map(oe=>`L:${oe.id}>${V.to}`))}const B=V=>V.endsWith(".go"),W=V=>{var ne;return V.kind==="file"&&!!((ne=V.parent)!=null&&ne.startsWith("c:"))&&B(V.path)},M=new Map,K=V=>{let ne=M.get(V.id);if(ne)return ne;const oe=h.get(V.id),he=oe.pkg.filter(me=>B(me.path));return ne=oe.files.some(me=>B(me.path))&&he.length?Xi(e,{...V,files:he}):new Map,M.set(V.id,ne),ne},S=V=>h.get(V.id).files.filter(ne=>!B(ne.path)),X=l.map(V=>{if(W(V))return new Map;if(V.kind==="container"){const ne=K(V);if(V.open)return ne;const oe=Xi(e,{...V,files:S(V).flatMap(he=>he.files)});for(const[he,me]of ne){const de=oe.get(he);de?(de.before||(de.before=me.before),de.after||(de.after=me.after),de.typeOnly&&(de.typeOnly=me.typeOnly)):oe.set(he,{...me})}return oe}return V.open?new Map:Xi(e,V)}),Z=new Map,_=(V,ne)=>{if(ne.kind!=="container"||ne.open)return;const oe=nc(V),he=`L:${V}>${ne.id}`,me=[...K(ne).keys()].some(oe)?[he]:[];for(const de of S(ne)){let Te=Z.get(de.id);Te||Z.set(de.id,Te=Xi(e,de)),[...Te.keys()].some(oe)&&me.push(`L:${V}>${de.id}`)}return me.length===1&&me[0]===he?void 0:me},O=new Set(X.flatMap(V=>[...V.keys()])),N=new Set([...O].map(Le)),F=Ta([...N]),G=V=>F?V.slice(F.length+1):V,Y=V=>{let ne=0,oe=0;return X.forEach((he,me)=>{for(const de of he.keys())V(de)&&(ne+=me,oe++)}),oe?ne/oe:0},ee=V=>{const ne=nc(V);l.forEach((oe,he)=>{const me=zy(V,oe.id,[...X[he]].filter(([Te])=>ne(Te)).map(([,Te])=>Te));if(!me)return;const de=_(V,oe);de&&(me.keys=de),te.push(me)})},D=[],te=[],ae=(V,ne,oe)=>{const he=[...O].filter(me=>Le(me)===V);he.sort((me,de)=>Y(Te=>Te===me)-Y(Te=>Te===de)||me.localeCompare(de));for(const me of he){const de=`i:f:${me}`;D.push({id:de,kind:"file",dir:V,label:ft(me),fullLabel:G(me),external:!1,depth:ne,parent:oe,file:me}),ee(de)}},Fe=(V,ne,oe)=>{if(V.kind==="group"){const Te=`i:g:${V.dir}`,nt=o.get(Te)??!0;if(D.push({id:Te,kind:"group",dir:V.dir,label:V.label,fullLabel:G(V.dir),external:!1,depth:ne,parent:oe,canOpen:!0,open:nt,folderCount:[...N].filter(Xe=>Xe!==V.dir&&un(Xe,V.dir)).length,directFileCount:[...O].filter(Xe=>Le(Xe)===V.dir).length}),!nt)ee(Te);else for(const Xe of[...V.children].sort((q,H)=>Number(q.kind==="dir"&&q.self)-Number(H.kind==="dir"&&H.self)||Y(J=>q.kind==="group"?un(Le(J),q.dir):Le(J)===q.dir)-Y(J=>H.kind==="group"?un(Le(J),H.dir):Le(J)===H.dir)||q.label.localeCompare(H.label)))Fe(Xe,ne+1,Te);return}if(V.self)return ae(V.dir,ne,oe);const he=`i:d:${V.dir}`,me=[...O].filter(Te=>Le(Te)===V.dir).length,de=o.get(he)??!1;D.push({id:he,kind:"dir",dir:V.dir,label:V.label,fullLabel:G(V.dir),external:!1,depth:ne,parent:oe,canOpen:!0,open:de,fileCount:me}),de?ae(V.dir,ne+1,he):ee(he)},Ce=$p([...N],F),_e=V=>Y(ne=>V.kind==="group"?un(Le(ne),V.dir):Le(ne)===V.dir);for(const V of[...Ce].sort((ne,oe)=>_e(ne)-_e(oe)||ne.label.localeCompare(oe.label)))Fe(V,0,void 0);return{sources:l,targets:T,links:L,targetPrefix:g,sourcePrefix:v,dependents:D,inLinks:te,dependentPrefix:F}}const _b=e=>e===""?"root":`d:${e}`,Tb=e=>`f:${e}`,$b=e=>`r:${e}`,Nn=e=>e==="root"?"":e.slice(2);function Rs(e,t,n,r){return{id:_b(e.path),kind:t,path:e.path,label:e.name,status:dl(e.stats),dir:e,full:r,children:n}}function rc(e){return{id:Tb(e.path),kind:"file",path:e.path,label:ft(e.path),status:e.status,file:e,children:[]}}function Ib(e,t){return t&&e?`ほか ${t} フォルダ・${e} ファイル`:t?`ほか ${t} フォルダ`:`ほか ${e} ファイル`}function Lb(e,t){const n=r=>{const i=[];for(const o of r.dirs){const s=t.has(o.path);i.push(Rs(o,s?"open":"dir",s?n(o):[],!0))}if(r.path===""||t.has(r.path))for(const o of r.files)i.push(rc(o));return i};return By(n(e))}function Ab(e,t,n,r,i=new Set){const o=new Set;for(const c of e.graph.files)c.status!=="unchanged"&&o.add(c.dir);for(const c of r)n.has(c)&&o.add(c);const s=new Set;for(const c of e.graph.files)if(c.status!=="unchanged")for(const d of e.edgesByFrom.get(c.path)??[])!d.external&&d.to!==c.dir&&n.has(d.to)&&s.add(d.to);const l=new Set([""]);for(const c of e.graph.files)if(c.status!=="unchanged"){l.add(c.dir);for(const d of Os(c.dir))l.add(d)}for(const c of s)for(const d of Os(c))l.add(d);const a=new Set(l);for(const c of o){a.add(c);for(const d of Os(c))a.add(d)}const u=c=>{const d=r.has(c.path),h=[],p=[],y=[],v=[];for(const w of c.dirs){const x=l.has(w.path)||s.has(w.path);if(!x&&!d){y.push(w);continue}let m;a.has(w.path)?i.has(w.path)&&l.has(w.path)?m={...Rs(w,"open",[],r.has(w.path)),collapsed:!0}:m=Ob({...Rs(w,"open",u(w),r.has(w.path)),revealedOnly:!l.has(w.path)}):m=Rs(w,"dir",[],!1),x?h.push(m):(y.push(w),p.push(m))}for(const w of c.files)w.status!=="unchanged"?h.push(rc(w)):(v.push(w),d&&p.push(rc(w)));return(v.length||y.length)&&h.push({id:$b(c.path),kind:"rest",path:c.path,label:Ib(v.length,y.length),status:"unchanged",full:d,hiddenFiles:v,hiddenDirs:y,children:p}),h};return By(u(t))}function Ob(e){if(e.kind!=="open"||e.full||e.collapsed||e.children.length!==1)return e;const t=e.children[0];return t.kind!=="open"?e:{...t,label:`${e.label}/${t.label}`}}function By(e){const t=new Map,n=new Map,r=(o,s)=>{n.set(o.path,s);for(const l of o.files)t.set(l.path,s);for(const l of o.dirs)r(l,s)},i=o=>{switch(o.kind){case"file":t.set(o.path,o.id);break;case"rest":if(!o.full)for(const s of o.hiddenFiles??[])t.set(s.path,o.id);break;case"dir":r(o.dir,o.id);break;case"open":o.collapsed?r(o.dir,o.id):n.set(o.path,o.id);break}o.children.forEach(i)};return e.forEach(i),{roots:e,fileRep:t,pkgRep:n}}const Rb=(e,t)=>`L:${e}>${t}`,Bi=e=>`I:${e}`;function Pr(e){if(e.startsWith("L:")){const t=e.slice(2),n=t.indexOf(">");return{kind:"link",from:t.slice(0,n),to:t.slice(n+1)}}return{kind:"item",id:e.slice(2)}}const Uy=Nb;function Hy(e,t,n){const r=Pr(n);if(r.kind==="link"){const i=Uy(e,t,r.from,r.to);return!i||i.after===0?"resolved":"open"}if(r.id.startsWith("f:")){const i=e.fileByPath.get(Nn(r.id));return!i||i.status==="removed"?"resolved":"open"}return t.has(Nn(r.id))?"open":"resolved"}function Si(e,t,n){const r=n.targets.map(o=>Hy(e,t,o)),i=r.filter(o=>o==="resolved").length;return i===0?"open":i===r.length?"resolved":"partial"}function ic(e,t){const n=Ry(e.graph.modules,t);if(!n)return t;const r=n.dir===""?t:t===n.dir?"":t.slice(n.dir.length+1);return r?`${n.path}/${r}`:n.path}function $a(e,t,n){if(n.startsWith("i:")){const s=n.slice(4);return n.startsWith("i:f:")?s:n.startsWith("i:d:")?`${s}/ 直下のファイル`:`${s}/ 配下`}const r=Nn(n);if(n.startsWith("f:"))return r;if(n.startsWith("d:"))return`${r}/ 配下`;if(n.startsWith("p:"))return`${r}/ 直下のファイル(パッケージ ${ft(r)})`;if(n.startsWith("c:"))return`パッケージ ${r}/`;const i=t.get(r),o=i?i.files.filter(s=>s.status==="unchanged").length:0;return`${r}/ の変更のないファイル ${o} 個`}function Mb(e,t,n){if(t.startsWith("x:"))return`${t.slice(2)}(外部パッケージ)`;if(t.startsWith("t:"))return t.slice(2);const r=t.slice(2),i=t.startsWith("g:")?`${ic(e,r)}/ 配下`:ic(e,r),o=((n==null?void 0:n.files)??[]).filter(s=>s.status!=="removed").map(s=>s.path.slice(r.length+1));return o.length?t.startsWith("g:")?`${i}(${o.join(", ")})`:`${i}/(${o.join(", ")})`:i}function Pb(e,t){if(!e||e.after===0)return"現在は存在しない(解消済み?)";const n=e.typeOnly?"、型のみ":"";if(t.startsWith("f:"))return(e.status==="added"?"今回追加した import":"既存の import")+n;const r=[`import しているファイル 変更前 ${e.before} → 変更後 ${e.after}`];return e.added&&r.push(`今回追加 ${e.added}`),e.removed&&r.push(`今回削除 ${e.removed}`),r.join("、")}function Fb(e,t,n,r=3){const i=_r(e,t,`r:${n}`,!1);if(!i||i.files.length===0)return null;const o=[...pl(e,i,!1).values()].filter(({link:l})=>l.before>0).sort((l,a)=>a.link.before-l.link.before).slice(0,r);if(o.length===0)return`${n}/ の変更のないファイル ${i.files.length} 個は、このリポジトリ内のパッケージを import していません`;const s=o.map(({target:l,link:a})=>`${ic(e,l.dir)} (${a.before})`).join(", ");return`${n}/ の変更のないファイル ${i.files.length} 個の主な依存先: ${s}`}function Wy(e,t,n,r={}){const i=r.includeResolved?n:n.filter(l=>Si(e,t,l)!=="resolved"),o=e.graph,s=r.header===!1?[]:[...Fl(o),"対象: コードの依存関係(depshape)",""];return i.forEach((l,a)=>{var v;const u=l.targets.map(Pr).filter(w=>w.kind==="link"),c=l.targets.map(Pr).filter(w=>w.kind==="item"),d=[];if(u.length){d.push(u.length===1?"依存:":`依存(${u.length}件):`);for(const w of u){const x=Uy(e,t,w.from,w.to),m=w.from.startsWith("i:")?$a(e,t,w.to):Mb(e,w.to,x);d.push(` - ${$a(e,t,w.from)} → ${m}(${Pb(x,w.from.replace(/^i:/,""))})`)}}if(c.length){d.push(c.length===1?"対象:":`対象(${c.length}件):`);for(const w of c){const x=Nn(w.id);if(w.id.startsWith("f:")){const m=e.fileByPath.get(x),g=[];!m||m.status==="removed"?g.push("現在は存在しない"):(m.status==="added"&&g.push("今回追加"),m.status==="modified"&&g.push("今回変更")),d.push(` - ファイル ${x}${g.length?`(${g.join("、")})`:""}`)}else d.push(` - ${w.id.startsWith("d:")?`フォルダ ${x}/`:$a(e,t,w.id)}`)}}const h=new Set;for(const w of u)w.from.startsWith("f:")&&h.add(((v=e.fileByPath.get(Nn(w.from)))==null?void 0:v.dir)??"");const p=[...h].filter(Boolean).map(w=>Fb(e,t,w)).filter(w=>!!w);for(const w of p)d.push(`参考: ${w}`);const y=Si(e,t,l);s.push(`${a+1}.${y==="partial"?"(一部は解消済み)":y==="resolved"?"(解消済み?)":""}`),s.push(...d.map(w=>` ${w}`)),s.push(` コメント: ${l.body.trim().replace(/\n/g,`
|
|
73
|
+
`)}`),s.push("")}),{text:s.join(`
|
|
74
|
+
`).trimEnd()+`
|
|
75
|
+
`,included:i.length,skipped:n.length-i.length}}function oc(e,t){var i;const n=Nn(t);if(t.startsWith("f:")){const o=n.slice(0,n.lastIndexOf("/"));return`${ft(o)}/${ft(n)}`}const r=((i=e.get(n))==null?void 0:i.name)??ft(n);return t.startsWith("r:")?`${r}/ のほか`:`${r}/`}function Ip(e,t,n){const r=Pr(n);if(r.kind==="item")return oc(t,r.id);const i=r.to.startsWith("x:")?r.to.slice(2):My(e.graph.modules,r.to.slice(2));return`${oc(t,r.from)} → ${i}`}function Db(e){const t=Pr(e.targets[0]??"I:root");return t.kind==="link"?t.from:t.id}const zb=U.forwardRef(function(t,n){const{model:r,tree:i,comments:o,selection:s,draft:l}=t,[a,u]=U.useState("open"),d=o.map(v=>({c:v,state:Si(r,i,v)})).filter(v=>a==="all"||v.state!=="resolved"),h=new Map;for(const v of d){const w=Db(v.c);h.set(w,[...h.get(w)??[],v])}const p=[...h.entries()].sort((v,w)=>Nn(v[0]).localeCompare(Nn(w[0]))),y=l.editingId!==null||l.body!==""||s.length>0;return f.jsxs("aside",{className:"comment-sidebar",children:[f.jsxs("div",{className:"dep-panel-head",children:[f.jsx("strong",{children:"コメント"}),f.jsxs("select",{value:a,onChange:v=>u(v.target.value),title:"表示するコメント",children:[f.jsx("option",{value:"open",children:"未対応のみ"}),f.jsx("option",{value:"all",children:"すべて"})]}),f.jsx("span",{className:"tspacer"}),f.jsx("button",{className:"icon-btn",onClick:t.onClose,title:"閉じる",children:"×"})]}),f.jsx("div",{className:"comment-sidebar-list",children:d.length===0?f.jsx("div",{className:"dep-panel-empty",children:o.length===0?"まだコメントはありません。パネルの矢印や箱をクリック(⌘ / Shift で複数)するか、ツリーの行の 💬 から書けます。":"未対応のコメントはありません。「すべて」に切り替えると解消済み?のものも見られます。"}):p.map(([v,w])=>f.jsxs("section",{className:"comment-group",children:[f.jsx("div",{className:"comment-group-head",title:Nn(v),children:oc(i,v)}),w.map(({c:x,state:m})=>{var g;return f.jsx(Sd,{body:x.body,state:m,meta:x.targets.length>1?`${x.targets.length}件`:void 0,lit:(g=t.hoveredKeys)==null?void 0:g.some(k=>x.targets.includes(k)),editing:l.editingId===x.id,onMouseEnter:()=>t.onHoverComment(x.targets),onMouseLeave:()=>t.onHoverComment(null),top:f.jsx("ul",{className:"comment-targets",onClick:()=>t.onShow(x),title:"クリックで図に表示",children:x.targets.map(k=>f.jsx("li",{className:Hy(r,i,k)==="resolved"?"resolved":"",children:Ip(r,i,k)},k))}),onCopy:()=>Do(Wy(r,i,[x],{includeResolved:!0}).text),onEdit:()=>t.onEdit(x),onDelete:()=>t.onDelete(x.id)},x.id)})]},v))}),f.jsx(Cd,{ref:n,className:"comment-composer",editing:l.editingId!==null,value:l.body,placeholder:"指摘を書く(例: usecase を経由する形にしてください)",onChange:v=>t.onDraft({...l,body:v}),onSave:t.onSave,onCancel:t.onCancel,canSave:s.length>0,showCancel:y,top:f.jsxs("div",{className:"composer-targets",children:[f.jsx("span",{className:"muted",children:l.editingId?"編集中のコメント先:":"コメント先:"}),s.length===0?f.jsx("span",{className:"muted",children:"矢印や箱・行を選ぶとここに入ります(⌘ / Shift で複数)"}):s.map(v=>f.jsxs("span",{className:`chip${v.startsWith("L:")?" link":""}`,title:v,children:[Ip(r,i,v),f.jsx("button",{onClick:()=>t.onRemoveTarget(v),title:"外す",children:"×"})]},v))]})})]})});function Bb(e,t,n){if(n(e)<=t)return e;const r=[...e];let i=r.length;for(;i>0&&n(r.slice(0,i).join("")+"…")>t;)i--;return r.slice(0,i).join("")+"…"}function Ub(e,t,n){const r=e.endsWith("/"),i=(r?e.slice(0,-1):e).split("/"),o=i.pop()+(r?"/":""),s=i.length,l=[];s&&l.push(i.join("/")+"/");for(let a=s-2;a>=1;a--)l.push(`${i[0]}/…/${i.slice(s-a).join("/")}/`);s>=2&&l.push(`…/${i[s-1]}/`,`${i[0]}/…/`),s&&l.push("…/");for(const a of l)if(n(a)+n(o)<=t)return{dir:a,name:o};return{dir:s?"…/":"",name:Bb(o,t-(s?n("…/"):0),n)}}function Vy(e,t){const n=t.startsWith("i:")?t.slice(2):t,r=n.slice(2);switch(n[0]){case"f":case"t":return{what:"file",path:r};case"g":return{what:"tree",path:r};case"d":return{what:e==="S"?"tree":"dir",path:r};case"x":return{what:"ext",path:r};default:return{what:"dir",path:r}}}const Hb=(e,t)=>{const n=Vy(e,t);return`${e}|${n.what}|${n.path}`},Wb=(e,t)=>t===""||e===t||e.startsWith(`${t}/`);function Gy(e,t,n){const[r,i,...o]=e.split("|");if(r!==t)return!1;const s=o.join("|"),l=Vy(t,n);switch(i){case"tree":return l.what!=="ext"&&Wb(l.path,s);case"dir":return l.what==="dir"&&l.path===s||l.what==="file"&&Le(l.path)===s;default:return i===l.what&&s===l.path}}const Lp=(e,t,n)=>[...e].some(r=>Gy(r,t,n));function sc(e,t,n){return new Set([...e].filter(r=>!Gy(r,t,n)))}const Ky=(e,t)=>Xu("depshape",e,t),qy=(e,t)=>Qu("depshape",e,t),Vb=7.3,lt=28,Ia=8,Tn=10,Gb=18,Kb=18,Ms=120,qb=20,Yb=16,Xb=14,Qb="12px ui-monospace, SFMono-Regular, Menlo, monospace";let Wr;function Xn(e){if(Wr===void 0&&(Wr=document.createElement("canvas").getContext("2d"),Wr&&(Wr.font=Qb)),Wr)return Wr.measureText(e).width;let t=0;for(const n of e)t+=/[ -鿿-]/.test(n)?2:1;return t*Vb}function Ap(e,t){if(Xn(e)<=t)return e;const n=[...e];let r=0;for(;r<n.length&&Xn("…"+n.slice(r).join(""))>t;)r++;return"…"+n.slice(r).join("")}const Zb=(e,t)=>Ub(e,t,Xn);function Op(e,t,n,r,i){const o=1-e;return o*o*o*t+3*o*o*e*n+3*o*e*e*r+e*e*e*i}function Rp(e){const t=Math.max(e.before,e.after,1);return 1.6+Math.min(3.2,Math.log2(t)*.8)+(e.status==="unchanged"?0:.5)}function Mp(e,t){const n=e.map(()=>0);let r=[...e.keys()],i=t;for(;r.length;){const o=i/r.length,s=r.filter(l=>e[l]<=o);if(!s.length){for(const l of r)n[l]=Math.max(Ms,o);break}for(const l of s)n[l]=e[l],i-=e[l];r=r.filter(l=>!s.includes(l))}return n}const La=e=>new Map(e.map(t=>[t.id,t.parent])),Aa=(e,t,n)=>{for(let r=e.get(t);r;r=e.get(r))if(r===n)return!0;return!1},Oa=e=>e.metaKey||e.ctrlKey||e.shiftKey,Pp=e=>e.detail>1,ds=e=>e.stopPropagation();function Jb(e){const{model:t,tree:n,pins:r,hovered:i,targetOpen:o,sourceOpen:s}=e,[l,a]=U.useState(()=>Ky("external","0")==="1"),u=U.useMemo(()=>jb(t,n,r,i,l,o,s),[t,n,r,i,l,o,s]),c=U.useMemo(()=>La(u.sources),[u]),d=U.useMemo(()=>La(u.targets),[u]),h=U.useMemo(()=>La(u.dependents),[u]),p=(j,re)=>Aa(c,j,re),y=(j,re)=>Aa(d,j,re),v=(j,re)=>Aa(h,j,re),w=j=>j.depth*Yb,x=j=>j.some(re=>re.canOpen)?Xb:0,m=x(u.sources),g=x(u.targets),k=x(u.dependents),C=j=>[j.folderCount?`${j.folderCount} フォルダ`:"",j.directFileCount?`${j.directFileCount} ファイル`:""].filter(Boolean).join("・"),E=j=>j.open?"":j.kind==="group"?` ${C(j)}`:j.fileCount?` ${j.fileCount} ファイル`:"",[A,T]=U.useState(null),L=U.useMemo(()=>{const j=(re,pe)=>new Set(e.hidden.size?pe.filter(ge=>Lp(e.hidden,re,ge.id)).map(ge=>ge.id):[]);return{S:j("S",u.sources),T:j("T",u.targets),I:j("I",u.dependents)}},[u,e.hidden]),b=U.useMemo(()=>u.links.filter(j=>!L.S.has(j.from)&&!L.T.has(j.to)),[u,L]),R=U.useMemo(()=>u.inLinks.filter(j=>!L.I.has(j.from)&&!L.S.has(j.to)),[u,L]),[$,P]=U.useState(null);U.useEffect(()=>{if(!$)return;const j=()=>P(null),re=pe=>pe.key==="Escape"&&j();return window.addEventListener("pointerdown",j),window.addEventListener("keydown",re),window.addEventListener("scroll",j,!0),window.addEventListener("blur",j),()=>{window.removeEventListener("pointerdown",j),window.removeEventListener("keydown",re),window.removeEventListener("scroll",j,!0),window.removeEventListener("blur",j)}},[$]);const I=j=>j&&e.openLabel(j)?j:void 0,z=(j,re,pe)=>ge=>{ge.preventDefault(),ge.stopPropagation(),P({x:ge.clientX,y:ge.clientY,col:j,id:re,file:pe,openAs:pe&&e.openLabel(pe)})},B=j=>{const re=j&&e.openLabel(j);return{dbl:re?`
|
|
76
|
+
ダブルクリックで${re==="差分を開く"?"このファイルの差分":"このファイル"}を開く`:"",menu:re?`「${re}」、`:""}},W=j=>b.filter(re=>re.from===j||p(re.from,j)),M=j=>new Set(u.links.filter(re=>re.from===j.id||p(re.from,j.id)).map(re=>re.to)).size,K=j=>b.filter(re=>re.to===j||y(re.to,j)),S=j=>R.filter(re=>re.from===j||v(re.from,j)),X=j=>j.keys??[Rb(j.from,j.to)],Z=j=>[...new Set(j.flatMap(X))],_=U.useRef(null),[O,N]=U.useState(600);U.useEffect(()=>{const j=_.current;if(!j)return;const re=new ResizeObserver(()=>N(j.clientWidth));return re.observe(j),N(j.clientWidth),()=>re.disconnect()},[u.sources.length>0]),U.useEffect(()=>{var j,re;i&&((re=(j=_.current)==null?void 0:j.querySelector(`[data-src="${CSS.escape(i)}"]`))==null||re.scrollIntoView({block:"nearest"}))},[i,u]);const F=u.dependents.length>0,G=F?3:2,Y=Math.round(Math.min(110,Math.max(44,O*.26/G))),ee=44,D=24+qb,te=j=>j.label+(j.suffix??"")+(M(j)===0&&!j.open?" 依存なし":""),ae=(j,re)=>Math.max(Ms,...j.map(pe=>D+w(pe)+re+Xn(pe.label+E(pe)))),Fe=Math.max(Ms,...u.sources.map(j=>ee+w(j)+m+Xn(te(j)))),Ce=ae(u.targets,g),_e=F?ae(u.dependents,k):0,ot=Math.max(Ms*G,O-Tn*2-Y*(G-1)-4),[V,ne,oe]=F?Mp([_e,Fe,Ce],ot):[0,...Mp([Fe,Ce],ot)],he=Tn,me=F?he+V+Y:Tn,de=me+ne+Y,Te=de+oe+Tn,nt=j=>j?j*(lt+Ia)-Ia:0,q=Tn+(F?Kb:0),H=q+(u.targetPrefix||u.sourcePrefix||u.dependentPrefix?Gb:0),J=Math.max(nt(u.sources.length),nt(u.targets.length),nt(u.dependents.length)),ce=j=>{const re=H+(J-nt(j.length))/2;return new Map(j.map((pe,ge)=>[pe.id,re+ge*(lt+Ia)]))},ue=ce(u.sources),ve=ce(u.targets),we=ce(u.dependents),Ne=H+J+Tn,Re=(j,re)=>A===null?!1:re?j.from===A||v(j.from,A)||j.to===A||p(j.to,A):j.from===A||p(j.from,A)||j.to===A||y(j.to,A),Ke=[...b,...R].some(j=>X(j).some(re=>e.selection.has(re))),Ue={unchanged:0,removed:1,added:2},Nt=j=>[...j].sort((re,pe)=>Ue[re.status]-Ue[pe.status]),kt=j=>j?`${t.graph.repoRoot}/${j}`:t.graph.repoRoot,ct=j=>`${j.label}${j.suffix??""}`,st=j=>j.kind==="group"?`${j.fullLabel}/ 配下`:j.kind==="dir"&&!j.file&&j.id.startsWith("i:")?`${j.fullLabel}/ 直下`:j.fullLabel,Mt=(j,re,pe)=>{if(re)return[j.status==="added"?"今回追加した import":j.status==="removed"?"今回削除した import":"既存の import"];const ge=[`import しているファイル: 変更前 ${j.before} → 変更後 ${j.after}${pe!==void 0?`(${pe} ファイル中)`:""}`];return(j.added||j.removed)&&ge.push(`うち 今回追加 ${j.added} / 今回削除 ${j.removed}`),ge},jt=(j,re,pe)=>{var Qe;const ge=[`${ct(re)} → ${st(pe)}${j.typeOnly?"(型のみの import)":""}`];if(ge.push(...Mt(j,re.kind==="file",re.files.filter(_t=>_t.status!=="removed").length)),(Qe=j.files)!=null&&Qe.length){const _t={added:"+",removed:"−",unchanged:"・"};ge.push("import しているファイル:");for(const Gt of j.files.slice(0,12))ge.push(` ${_t[Gt.status]} ${Gt.path.slice(pe.dir?pe.dir.length+1:0)}`);j.files.length>12&&ge.push(` …ほか ${j.files.length-12} 件`)}return ge.join(`
|
|
77
|
+
`)},Q=(j,re,pe)=>[`${st(re)} → ${ct(pe)}${j.typeOnly?"(型のみの import)":""}`,...Mt(j,re.kind==="file")].join(`
|
|
78
|
+
`),ie=(j,re,pe,ge,Qe,_t,Gt,Kt)=>{const qt=Y/2,Yt=X(j),vn=Yt.length>0&&Yt.every(Ft=>e.selection.has(Ft)),Pt=Yt.some(Ft=>{var Ur;return(Ur=e.litKeys)==null?void 0:Ur.has(Ft)}),gr=Yt.reduce((Ft,Ur)=>Ft+(e.commentCounts.get(Ur)??0),0),Ze=Re(j,_t),Un=`M${re},${pe} C${re+qt},${pe} ${ge-qt},${Qe} ${ge},${Qe}`,Hn=Ft=>[Op(Ft,re,re+qt,ge-qt,ge),Op(Ft,pe,pe,Qe,Qe)];return f.jsxs("g",{className:`plink${Ze||Pt?" active":""}${vn?" selected":""}`,onClick:Ft=>e.onSelectKeys(Yt,Oa(Ft)),onMouseEnter:()=>e.onHoverKey(Yt),onMouseLeave:()=>e.onHoverKey(null),children:[(vn||Pt)&&f.jsx("path",{d:Un,className:Pt?"psel lit":"psel",style:{strokeWidth:Rp(j)+7}}),f.jsx("path",{d:Un,className:`medge ${j.status}${j.typeOnly?" typeonly":""}${Ze||vn||Pt?" active":""}`,style:{strokeWidth:Rp(j)},markerEnd:`url(#parrow-${j.status})`}),f.jsx("path",{d:Un,className:"phit",children:f.jsx("title",{children:`${Gt}
|
|
79
|
+
クリックで選択(⌘ / Shift で追加)`})}),gr>0&&f.jsxs("g",{className:"pcomment",children:[f.jsx("circle",{cx:Hn(.5)[0],cy:Hn(.5)[1],r:7}),f.jsx("text",{x:Hn(.5)[0],y:Hn(.5)[1]+3.5,textAnchor:"middle",children:gr})]}),Kt!==null&&f.jsx("text",{x:Hn(Kt)[0],y:Hn(Kt)[1]-4,textAnchor:"middle",className:"pcount",children:j.before!==j.after?`${j.before}→${j.after}`:j.after})]},`${j.from}>${j.to}`)},ye=(j,re)=>{const{dir:pe,name:ge}=Zb(j,re);return f.jsxs(f.Fragment,{children:[pe&&f.jsx("tspan",{className:"pdir",children:pe}),f.jsx("tspan",{className:"pname",children:ge})]})},Ee=(j,re)=>{var lf;const pe=re==="dependent",ge=(pe?we:ve).get(j.id),Qe=pe?he:de,_t=pe?V:oe,Gt=pe?k:g,Kt=Qe+w(j),qt=_t-w(j),Yt=j.file?`f:${j.file}`:j.kind==="group"||pe?`d:${j.dir}`:j.self?`p:${j.dir}`:j.id,vn=r.includes(Yt),Pt=pe?S(j.id):K(j.id),gr=Pt.length>0&&Pt.every(on=>on.status==="added"),Ze=j.file?(lf=t.fileByPath.get(j.file))==null?void 0:lf.status:void 0,Un=E(j),Hn=pe?"import している側の":"import している ",Ft=j.kind==="group"?C(j):`import している ${j.fileCount} ファイル`,Ur=j.canOpen?j.open?`
|
|
80
|
+
▾ でまとめる`:`
|
|
81
|
+
▸ で開いて、${Ft}を表示`:"",jv=j.external?`${j.dir}(外部パッケージ)`:j.file?`${kt(j.file)}${Ze==="added"?"(今回追加したファイル)":Ze==="modified"?"(今回変更したファイル)":""}`:j.kind==="group"?`${kt(j.dir)}/ 配下(${Hn}${C(j)}をまとめた行)`:pe?`${kt(j.dir)}/ 直下の、import しているファイル`:`${kt(j.dir)}${j.self?`
|
|
82
|
+
このパッケージ(フォルダ直下のファイル)だけ。下のフォルダは含まない`:""}`,_v=pe?"ここから出る依存":"ここに入る依存",Vo=I(j.file),sf=B(Vo);return f.jsxs("g",{className:`pnode target ${j.kind}${pe?" dependent":""}${(pe?L.I:L.T).has(j.id)?" hid":""}${j.self?" self":""}${j.open?" open":""}${gr?" new":""}${vn?" pinned":""}${Ze&&Ze!=="unchanged"?` f-${Ze}`:""}`,onMouseEnter:()=>T(j.id),onMouseLeave:()=>T(null),onClick:on=>!Pp(on)&&e.onSelectKeys(Z(Pt),Oa(on)),onDoubleClick:Vo?()=>{var on;return(on=e.onOpenFile)==null?void 0:on.call(e,Vo)}:void 0,onContextMenu:z(pe?"I":"T",j.id,Vo),children:[f.jsx("title",{children:`${jv}
|
|
83
|
+
クリックで${_v}をすべて選択${Ur}${sf.dbl}
|
|
84
|
+
右クリックで${sf.menu}線を非表示 / 表示`}),f.jsx("rect",{x:Kt,y:ge,width:qt,height:lt,rx:6}),j.canOpen&&f.jsxs("g",{className:"pchev",onClick:on=>{on.stopPropagation(),e.onToggleTarget(j.id,!j.open)},onDoubleClick:ds,children:[f.jsx("title",{children:j.open?"まとめる":`開いて、${Ft}を表示`}),f.jsx("rect",{x:Kt,y:ge,width:10+Gt,height:lt}),f.jsx("text",{x:Kt+8,y:ge+lt/2+4,children:j.open?"▾":"▸"})]}),f.jsxs("text",{x:Kt+10+Gt,y:ge+lt/2+4,className:"plabel",children:[j.external?Ap(j.label,qt-D-Gt):ye(j.label,qt-D-Gt-(Un?Xn(Un):0)),Un&&f.jsx("tspan",{className:"pnone",children:Un})]}),!j.external&&f.jsxs("g",{className:`pbtn${vn?" on":""}`,onClick:on=>{on.stopPropagation(),e.onTogglePin(Yt)},onDoubleClick:ds,children:[f.jsx("title",{children:vn?"ピン留め中(クリックでピン留めを外す)":"ピン留めして、この先の依存をたどる"}),f.jsx("rect",{x:Kt+qt-26,y:ge+4,width:20,height:lt-8,rx:4}),f.jsx(qu,{on:vn,x:Kt+qt-23,y:ge+lt/2-7})]})]},j.id)},je=(j,re,pe)=>j&&f.jsxs("text",{x:re,y:q+10,className:"pcaption",children:[f.jsx("title",{children:kt(j)}),Ap(`${j}/ 以下`,pe)]});return f.jsxs("div",{className:"dep-panel",children:[f.jsxs("div",{className:"dep-panel-head",children:[f.jsx("strong",{children:"依存の可視化"}),f.jsxs("span",{className:"muted",children:[r.length?`ピン留め ${r.length}`:"",i?`${r.length?" + ":""}ホバー中 1`:""]}),f.jsx("span",{className:"tspacer"}),f.jsxs("label",{className:"ds-check",title:"依存先の列に、npm パッケージや Go の標準・外部パッケージも描きます(上の差分の数には含みません)",children:[f.jsx("input",{type:"checkbox",checked:l,onChange:j=>{a(j.target.checked),qy("external",j.target.checked?"1":"0")}}),"外部パッケージも表示"]}),f.jsx("button",{className:"ds-btn",onClick:e.onClearPins,disabled:r.length===0,children:"ピンをすべて外す"})]}),u.sources.length===0?f.jsxs("div",{className:"dep-panel-empty",children:["左のツリーの行にホバーすると、ここに表示され、右に依存先(使っているもの)、左に依存元(使っている側)が出ます。",f.jsx("br",{}),"ピンのアイコンでピン留めすると表示し続けるので、複数並べて依存の形を比べられます。"]}):f.jsx("div",{className:"dep-panel-scroll",ref:_,children:f.jsxs("svg",{width:Te,height:Ne,className:`panel-svg${A||e.litKeys?" hovering":""}${Ke?" selecting":""}`,children:[f.jsx("defs",{children:["unchanged","added","removed"].map(j=>f.jsx("marker",{id:`parrow-${j}`,viewBox:"0 0 8 8",refX:"7",refY:"4",markerWidth:"8",markerHeight:"8",markerUnits:"userSpaceOnUse",orient:"auto",children:f.jsx("path",{d:"M0,0 L8,4 L0,8 z",className:`arrowhead ${j}`})},j))}),F&&f.jsxs("g",{className:"ptitle",children:[f.jsx("text",{x:he,y:Tn+10,children:"依存元(使っている側)"}),f.jsx("text",{x:me,y:Tn+10,children:"ピン留め"}),f.jsx("text",{x:de,y:Tn+10,children:"依存先(使っているもの)"})]}),je(u.dependentPrefix,he,V),je(u.sourcePrefix,me,ne),je(u.targetPrefix,de,oe),Nt(R).map(j=>{const re=u.dependents.find(ge=>ge.id===j.from),pe=u.sources.find(ge=>ge.id===j.to);return ie(j,he+V,we.get(j.from)+lt/2,me+w(pe)-1,ue.get(j.to)+lt/2,!0,Q(j,re,pe),re.kind!=="file"?.2:null)}),Nt(b).map(j=>{const re=u.sources.find(ge=>ge.id===j.from),pe=u.targets.find(ge=>ge.id===j.to);return ie(j,me+ne,ue.get(j.from)+lt/2,de+w(pe)-1,ve.get(j.to)+lt/2,!1,jt(j,re,pe),re.kind!=="file"?.8:null)}),u.dependents.map(j=>Ee(j,"dependent")),u.sources.map(j=>{const re=ue.get(j.id),pe=M(j),ge=me+w(j),Qe=ne-w(j),_t=j.kind==="container",Gt=pe===0&&!j.open,Kt=_t?`/
|
|
85
|
+
ピン留めした ${j.files.length} ファイルをまとめた箱(Go ではこの箱がパッケージで、依存元の線はここに届きます)`:j.kind==="file"?"":`
|
|
86
|
+
${j.files.length} ファイル`,qt=Z([...W(j.id),..._t?R.filter(Ze=>Ze.to===j.id):[]]),Yt=_t?"ファイルごと":"中のフォルダ・ファイルごと",vn=j.canOpen?j.open?`
|
|
87
|
+
▾ でまとめる`:`
|
|
88
|
+
▸ で開いて、${Yt}に分ける`:"",Pt=j.kind==="file"?I(j.path):void 0,gr=B(Pt);return f.jsxs("g",{"data-src":j.id,className:`pnode source ${j.kind} ${j.status}${L.S.has(j.id)?" hid":""}${j.pinned?" pinned":" temp"}${j.depth?" child":""}${j.open?" open":""}`,onMouseEnter:()=>T(j.id),onMouseLeave:()=>T(null),onClick:Ze=>!Pp(Ze)&&e.onSelectKeys(qt,Oa(Ze)),onDoubleClick:Pt?()=>{var Ze;return(Ze=e.onOpenFile)==null?void 0:Ze.call(e,Pt)}:void 0,onContextMenu:z("S",j.id,Pt),children:[f.jsx("title",{children:`${kt(j.path)}${Kt}
|
|
89
|
+
依存先 ${pe}
|
|
90
|
+
クリックで${_t?"この箱に出入りする":"ここから出る"}依存をすべて選択${vn}${gr.dbl}
|
|
91
|
+
右クリックで${gr.menu}線を非表示 / 表示`}),f.jsx("rect",{x:ge,y:re,width:Qe,height:lt,rx:6}),j.canOpen&&f.jsxs("g",{className:"pchev",onClick:Ze=>{Ze.stopPropagation(),e.onToggleSource(j.id,!j.open)},onDoubleClick:ds,children:[f.jsx("title",{children:j.open?"まとめる":`開いて、${Yt}に分ける`}),f.jsx("rect",{x:ge,y:re,width:10+m,height:lt}),f.jsx("text",{x:ge+8,y:re+lt/2+4,children:j.open?"▾":"▸"})]}),f.jsxs("text",{x:ge+10+m,y:re+lt/2+4,className:"plabel",children:[ye(j.label,Qe-ee-m-Xn(j.suffix??"")-(Gt?Xn(" 依存なし"):0)),j.suffix&&f.jsx("tspan",{className:"psuffix",children:j.suffix}),Gt&&f.jsx("tspan",{className:"pnone",children:" 依存なし"})]}),j.isPin&&f.jsxs("g",{className:"pbtn",onClick:Ze=>{Ze.stopPropagation(),e.onTogglePin(j.id)},onDoubleClick:ds,children:[f.jsx("title",{children:"ピン留め中(クリックでピン留めを外す)"}),f.jsx("rect",{x:me+ne-26,y:re+4,width:20,height:lt-8,rx:4}),f.jsx(qu,{on:j.pinned,x:me+ne-23,y:re+lt/2-7})]})]},j.id)}),u.targets.map(j=>Ee(j,"target"))]})}),$&&f.jsx("div",{className:"panel-menu",style:{left:$.x,top:$.y},role:"menu",onPointerDown:j=>j.stopPropagation(),children:(()=>{const j=Lp(e.hidden,$.col,$.id),re=ge=>()=>{e.onHiddenChange(ge),P(null)},pe=$.file;return f.jsxs(f.Fragment,{children:[pe&&f.jsxs(f.Fragment,{children:[f.jsxs("button",{role:"menuitem",onClick:()=>{var ge;(ge=e.onOpenFile)==null||ge.call(e,pe),P(null)},children:[f.jsx(kd,{size:14}),$.openAs]}),f.jsx("div",{className:"panel-menu-sep",role:"separator"})]}),j?f.jsxs("button",{role:"menuitem",onClick:re(sc(e.hidden,$.col,$.id)),children:[f.jsx(Sa,{on:!0}),"表示"]}):f.jsxs("button",{role:"menuitem",onClick:re(new Set([...e.hidden,Hb($.col,$.id)])),children:[f.jsx(Sa,{on:!1}),"非表示"]}),f.jsxs("button",{role:"menuitem",disabled:e.hidden.size===0,onClick:re(new Set),children:[f.jsx(Sa,{on:!0}),"すべて表示"]})]})})()})]})}const hl=340,Fp=220,Dp=360,zp=260,Yy="depshape.layout";function e1(){try{const e=JSON.parse(localStorage.getItem(Yy)??"{}");return{tree:typeof e.tree=="number"&&e.tree>0?e.tree:void 0,side:typeof e.side=="number"&&e.side>0?e.side:hl}}catch{return{side:hl}}}function fs(e){try{localStorage.setItem(Yy,JSON.stringify(e))}catch{}}function ps(e,t,n){const r=Mr*(n?2:1);let i=e.side;n&&(i=Math.max(zp,Math.min(i,t-r-Fp-Dp)));const o=t-r-(n?i:0);return{tree:e.tree===void 0?void 0:Math.max(Fp,Math.min(e.tree,o-Dp)),side:Math.max(zp,i)}}function t1(e,t){const n=e.tree===void 0?"minmax(0, 1fr)":`${e.tree}px`,r=e.tree===void 0?"minmax(0, 1.15fr)":"minmax(0, 1fr)";return[n,`${Mr}px`,r,...t?[`${Mr}px`,`${e.side}px`]:[]].join(" ")}const Xy="depshape.reviewed:",n1=e=>`${e.repoRoot}|${e.targetLabel}|${e.baseLabel}`,Bp=e=>jn(Xy+e,{}),r1=(e,t)=>hn(Xy+e,t);function i1(e){const t=new Map;for(const n of e){if(n.external||n.status==="unchanged")continue;let r=t.get(n.from);r||t.set(n.from,r=[]),r.push(`${n.status==="added"?"+":"-"} ${n.to}`)}return new Map([...t].map(([n,r])=>[n,so(r.sort())]))}function o1(e,t){const n=new Set;for(const[r,i]of e)t[r]===i&&n.add(r);return n}function s1(e,t,n){let r=!1;for(const i of t.keys())if(!(e!==""&&!i.startsWith(e+"/"))){if(!n.has(i))return!1;r=!0}return r}const Qy=e=>`import が ${e.added} 増え、${e.removed} 減った`,l1=e=>e.metaKey||e.ctrlKey||e.shiftKey;function a1(e,t){const n=new Map;for(const r of e.graph.edges){if(r.external||r.status==="unchanged")continue;const i=t.fileRep.get(r.from);if(!i)continue;let o=n.get(i);o||n.set(i,o={added:0,removed:0}),o[r.status]++}return n}const hs=e=>t=>{t.stopPropagation(),e()};function u1(e){const{model:t,root:n,tree:r,open:i,mode:o,pins:s}=e,l=!!e.onOpenFile,[a,u]=U.useState(null),c=U.useRef(void 0),d=U.useRef(null),h=U.useRef(null),[p,y]=U.useState(e1),v=dy(h),w=U.useRef(null),x=U.useMemo(()=>[...i].sort().join("|"),[i]),m=U.useMemo(()=>[...e.collapsed].sort().join("|"),[e.collapsed]),g=U.useMemo(()=>o==="all"?Lb(n,i):Ab(t,n,r,i,e.collapsed),[t,n,r,o,x,m]),k=U.useMemo(()=>a1(t,g),[t,g]),C=U.useMemo(()=>new Set(s),[s]),[E,A]=U.useState(()=>new Map),T=(q,H)=>A(J=>new Map(J).set(q,H)),[L,b]=U.useState(()=>new Map),R=(q,H)=>b(J=>new Map(J).set(q,H)),[$,P]=U.useState(()=>new Set),[I,z]=U.useState([]),[B,W]=U.useState({editingId:null,body:""}),[M,K]=U.useState(null),[S,X]=U.useState(null),Z=U.useRef(null),_=U.useMemo(()=>new Set(I),[I]),{comments:O,sidebarOpen:N,onSidebarOpen:F}=e,G=U.useMemo(()=>O.filter(q=>Si(t,r,q)!=="resolved"),[O,t,r]),Y=U.useMemo(()=>{const q=new Map;for(const H of G)for(const J of H.targets)q.set(J,(q.get(J)??0)+1);return q},[G]),ee=q=>{const H=J=>q===""||J.startsWith(q+"/");return G.filter(J=>J.targets.some(ce=>{const ue=Pr(ce);return H(Nn(ue.kind==="item"?ue.id:ue.from.startsWith("i:")?ue.to:ue.from))})).length},D=()=>{Z.current?Z.current.focus():window.setTimeout(()=>{var q;return(q=Z.current)==null?void 0:q.focus()},0)},te=(q,H)=>{if(q.length===0)return;let J=[];z(ce=>(H?J=q.every(ve=>ce.includes(ve))?ce.filter(ve=>!q.includes(ve)):[...ce,...q.filter(ve=>!ce.includes(ve))]:J=ce.length===q.length&&q.every(ve=>ce.includes(ve))?[]:q,J)),q.length&&F(!0)},ae=()=>{z([]),W({editingId:null,body:""})},Fe=U.useRef(e.active);Fe.current=e.active,U.useEffect(()=>{const q=H=>{!Fe.current||document.activeElement instanceof HTMLTextAreaElement||document.activeElement instanceof HTMLInputElement||(H.key==="Escape"&&z([]),H.key==="c"&&!H.metaKey&&!H.ctrlKey&&!H.altKey&&(H.preventDefault(),F(!0),D()))};return window.addEventListener("keydown",q),()=>window.removeEventListener("keydown",q)},[]);const Ce=()=>{if(!B.body.trim()||I.length===0)return;const q=B.editingId?O.map(H=>H.id===B.editingId?{...H,targets:I,body:B.body.trim()}:H):[...O,{id:`${Date.now().toString(36)}${Math.random().toString(36).slice(2,6)}`,targets:I,body:B.body.trim(),createdAt:Date.now()}];e.onCommentsChange(q),ae()},_e=q=>{const H=q.targets.map(Pr).flatMap(ce=>ce.kind==="link"?[ce]:[]),J=H.map(ce=>ce.from.startsWith("i:")?ce.to:ce.from);P(ce=>{let ue=new Set(ce);for(const ve of H){const we=ve.from.startsWith("i:");ue=sc(sc(ue,we?"I":"S",ve.from),we?"S":"T",ve.to)}return ue}),e.onPin(J.filter(ce=>!ce.startsWith("c:"))),b(ce=>{const ue=new Map(ce);for(const ve of J)ve.startsWith("f:")&&ue.set(`c:${Le(ve.slice(2))}`,!0);return ue}),A(ce=>{const ue=new Map(ce);for(const ve of H){if(ve.from.startsWith("i:")){const Re=ve.from.slice(2),Ke=Re.startsWith("f:")?Le(Re.slice(2)):Re.slice(2);for(let Ue=Le(Ke);Ue;Ue=Le(Ue))ue.set(`i:g:${Ue}`,!0);Re.startsWith("f:")?ue.set(`i:d:${Ke}`,!0).set(`i:g:${Ke}`,!0):Re.startsWith("d:")?ue.set(`i:d:${Ke}`,!1).set(`i:g:${Ke}`,!0):ue.set(`i:g:${Ke}`,!1);continue}if(ve.to.startsWith("x:"))continue;const we=ve.to.slice(2),Ne=ve.to.startsWith("t:")?Le(we):we;for(let Re=Le(Ne);Re;Re=Le(Re))ue.set(`g:${Re}`,!0);ve.to.startsWith("t:")?ue.set(`d:${Ne}`,!0).set(`g:${Ne}`,!0):ve.to.startsWith("d:")?ue.set(`d:${Ne}`,!1).set(`g:${Ne}`,!0):ue.set(`g:${Ne}`,!1)}return ue}),z(q.targets)},ot=q=>{_e(q),W({editingId:q.id,body:q.body}),D()},V=q=>{window.clearTimeout(c.current),u(q)},ne=()=>{window.clearTimeout(c.current),c.current=window.setTimeout(()=>u(null),80)},oe=q=>{var H;return((H=d.current)==null?void 0:H.querySelector(`[data-id="${CSS.escape(q)}"]`))??null},he=(q,H)=>q.getBoundingClientRect().top-H.getBoundingClientRect().top;U.useLayoutEffect(()=>{const q=d.current;if(!q||!w.current)return;const H=oe(w.current.id);H&&(q.scrollTop+=he(H,q)-w.current.top),w.current=null},[g]);const me=q=>{const H=d.current,J=oe(q.id);H&&J&&(w.current={id:q.id,top:he(J,H)}),o==="changes"&&q.kind==="open"&&!q.revealedOnly?e.onCollapseToggle(q.path):e.onToggle(q.path)},de=q=>q?`${t.graph.repoRoot}/${q}`:t.graph.repoRoot,Te=q=>{switch(q.kind){case"file":return`${de(q.path)}
|
|
92
|
+
${q.file.linesAfter??q.file.linesBefore} 行`;case"dir":return`${de(q.path)}
|
|
93
|
+
${q.dir.stats.total} ファイル(クリックで開く)`;case"open":return`${de(q.path)}
|
|
94
|
+
${q.dir.stats.total} ファイル(${q.collapsed?"クリックで開く":"クリックで閉じる"})`;case"rest":{const H=[...(q.hiddenDirs??[]).map(J=>J.name+"/"),...(q.hiddenFiles??[]).map(J=>J.path.slice(J.path.lastIndexOf("/")+1))];return q.full?`${de(q.path)} の中で変更のないもの(クリックで閉じる)`:[`${de(q.path)} の中で変更のないもの(クリックで開く)`,...H.slice(0,12),...H.length>12?[`…ほか ${H.length-12} 件`]:[]].join(`
|
|
95
|
+
`)}}},nt=q=>{var kt;const H=q.kind==="open"?q.collapsed?"▸":"▾":q.kind==="rest"?q.full?"▾":"▸":q.kind==="dir"?"▸":"",J=q.kind==="file"||q.kind==="rest"?q.label:`${q.label}/`,ce=q.kind==="open"&&!q.collapsed||q.kind==="rest"&&q.full?void 0:k.get(q.id),ue=C.has(q.id),ve=Y.get(Bi(q.id))??0,we=q.kind==="dir"||q.kind==="open"&&q.collapsed,Ne=ve||(we?ee(q.path):0),Re=q.kind==="file"&&e.reviewTargets.has(q.path),Ke=q.kind==="file"?e.openLabel(q.path):void 0,Ue=q.kind==="file"?e.reviewed.has(q.path):q.kind==="dir"||q.kind==="open"?s1(q.path,e.reviewTargets,e.reviewed):!1,Nt=["trow",q.kind,q.status,(kt=q.file)!=null&&kt.isTest?"test":"",ue?"pinned":"",Ue?"reviewed":"",a===q.id?"hovered":"",_.has(Bi(q.id))?"picked":"",M!=null&&M.has(Bi(q.id))?"lit":""].filter(Boolean).join(" ");return f.jsxs("div",{className:Nt,"data-id":q.id,title:Te(q),onMouseEnter:()=>q.kind==="rest"?ne():V(q.id),onMouseLeave:ne,onClick:ct=>{l1(ct)?te([Bi(q.id)],!0):q.kind!=="file"&&me(q)},onDoubleClick:Ke?()=>{var ct;return(ct=e.onOpenFile)==null?void 0:ct.call(e,q.path)}:void 0,children:[f.jsx("span",{className:"ticon",children:H}),f.jsx("span",{className:"tlabel",children:J}),q.dir&&f.jsx(Dl,{stats:q.dir.stats,unit:"ファイル"}),f.jsx("span",{className:"tspacer"}),ce&&f.jsx(Ti,{stats:ce,title:Qy(ce)}),Ne>0&&f.jsx(Io,{n:Ne,title:ve?"この行へのコメント":"この中のファイルへのコメント(未対応)"}),Re?f.jsx("button",{className:`tbtn treview${Ue?" on":""}`,onClick:hs(()=>e.onReviewed(q.path,!Ue)),title:Ue?"確認済み(クリックで外す)":"確認済みにする(このファイルの依存がまた変わると外れます)","aria-label":Ue?"確認済みを外す":"確認済みにする","aria-pressed":Ue,children:f.jsx(Yu,{size:13})}):Ue?f.jsx("span",{className:"tcheck",title:"中の依存が変わったファイルをすべて確認済み",children:f.jsx(Yu,{size:13})}):f.jsx("span",{className:"tbtn-space"}),l&&(Ke?f.jsx("button",{className:"tbtn tdiff",onClick:hs(()=>{var ct;return(ct=e.onOpenFile)==null?void 0:ct.call(e,q.path)}),title:`${Ke}(ダブルクリックでも開けます)`,"aria-label":Ke,children:f.jsx(kd,{size:13})}):f.jsx("span",{className:"tbtn-space"})),f.jsx("button",{className:"tbtn",onClick:hs(()=>{z([Bi(q.id)]),F(!0),D()}),title:"この行にコメントを書く(⌘ / Shift + クリックで複数選択)","aria-label":"コメントする",children:f.jsx(_i,{size:13})}),q.kind==="rest"?f.jsx("span",{className:"tbtn-space"}):f.jsx("button",{className:`tbtn tpin${ue?" on":""}`,onClick:hs(()=>e.onTogglePin(q.id)),title:ue?"パネルにピン留め中(クリックでピン留めを外す)":"パネルにピン留めする(表示し続ける)",children:f.jsx(qu,{on:ue})})]})},Xe=q=>q.map(H=>H.kind==="open"?f.jsxs("div",{className:`tgroup ${H.status}${H.full?"":" pruned"}${H.collapsed?" collapsed":""}`,children:[nt(H),!H.collapsed&&f.jsx("div",{className:"tchildren",children:Xe(H.children)})]},H.id):H.kind==="rest"&&H.full?f.jsxs("div",{className:"tgroup rest-group",children:[nt(H),f.jsx("div",{className:"tchildren",children:Xe(H.children)})]},H.id):f.jsx("div",{children:nt(H)},H.id));return f.jsxs("div",{className:"map",children:[f.jsxs("div",{className:"map-toolbar",children:[f.jsxs("div",{className:"ds-seg",role:"group","aria-label":"表示範囲",children:[f.jsx("button",{className:o==="changes"?"on":"",onClick:()=>e.onModeChange("changes"),title:"変更したファイルと、その依存先だけを表示",children:"変更まわり"}),f.jsx("button",{className:o==="all"?"on":"",onClick:()=>e.onModeChange("all"),title:"リポジトリ全体のツリーを表示",children:"全体"})]}),o==="all"?f.jsxs(f.Fragment,{children:[f.jsx("button",{className:"ds-btn",onClick:e.onExpandChanged,children:"変更箇所をすべて開く"}),f.jsx("button",{className:"ds-btn",onClick:e.onCollapseAll,children:"すべて閉じる"})]}):f.jsxs(f.Fragment,{children:[f.jsx("button",{className:"ds-btn",onClick:e.onExpandAll,disabled:e.collapsed.size===0,title:"閉じたフォルダをすべて開く",children:"すべて開く"}),f.jsx("button",{className:"ds-btn",onClick:e.onCollapseAll,disabled:i.size===0,title:"「ほか N ファイル」で開いたものを閉じる",children:"変更まわりだけに戻す"})]})]}),f.jsxs("div",{className:`map-body${N?" with-sidebar":""}`,ref:h,style:{gridTemplateColumns:t1(v?ps(p,v,N):p,N)},children:[f.jsx("div",{className:"map-scroll tree",ref:d,onMouseLeave:ne,children:Xe(g.roots)}),f.jsx($o,{title:"ドラッグでツリーとパネルの幅を変える(ダブルクリックで元に戻す)",start:()=>{var q;return((q=d.current)==null?void 0:q.getBoundingClientRect().width)??0},onDrag:(q,H)=>y(J=>ps({...J,tree:q+H},v,N)),onEnd:()=>y(q=>(fs(q),q)),onReset:()=>y(q=>(fs({...q,tree:void 0}),{...q,tree:void 0}))}),f.jsx(Jb,{model:t,tree:r,pins:s,hovered:a&&!C.has(a)?a:null,onTogglePin:e.onTogglePin,onClearPins:e.onClearPins,selection:_,litKeys:M,commentCounts:Y,onSelectKeys:te,onHoverKey:X,targetOpen:E,sourceOpen:L,onToggleSource:R,onToggleTarget:T,hidden:$,onHiddenChange:P,openLabel:e.openLabel,onOpenFile:e.onOpenFile}),N&&f.jsx($o,{title:"ドラッグでコメントの幅を変える(ダブルクリックで元に戻す)",start:()=>ps(p,v,!0).side,onDrag:(q,H)=>y(J=>ps({...J,side:q-H},v,!0)),onEnd:()=>y(q=>(fs(q),q)),onReset:()=>y(q=>(fs({...q,side:hl}),{...q,side:hl}))}),N&&f.jsx(zb,{ref:Z,model:t,tree:r,comments:O,selection:I,draft:B,onDraft:W,onSave:Ce,onCancel:ae,onRemoveTarget:q=>z(H=>H.filter(J=>J!==q)),onClose:()=>F(!1),onShow:_e,onEdit:ot,onDelete:q=>{e.onCommentsChange(O.filter(H=>H.id!==q)),B.editingId===q&&ae()},hoveredKeys:S,onHoverComment:q=>K(q?new Set(q):null)})]}),f.jsx("div",{className:"legend",children:f.jsxs("span",{className:"muted",children:["行にホバーすると右のパネルに依存先が出ます ・ ピンのアイコンでピン留めし、複数並べて比べられます ・ 矢印や箱のクリック(⌘ / Shift で複数)・行の吹き出しでコメント(c キーで入力欄へ)・ 「+n 依存」= 今回増えた import ・",o==="changes"?" 「ほか N ファイル」= 変更のない既存ファイル(クリックで展開)":" フォルダをクリックで開閉"]})})]})}function c1({data:e,active:t,onComments:n,modules:r,openIn:i}){const o=e.repoRoot,[s,l]=Ca(`depshape.expanded:${o}`),[a,u]=Ca(`depshape.revealed:${o}`),[c,d]=Ca(`depshape.collapsed:${o}`),h=`depshape.pins:${o}`,[p,y]=U.useState(()=>d1(jn(h,[])));U.useEffect(()=>hn(h,p),[h,p]);const v=`depshape.comments:${o}|${e.targetLabel}|${e.baseLabel}`,[w,x]=U.useState(()=>bd(v)),[m,g]=U.useState(Ky("mapMode","changes")),[k,C]=U.useState(!1),E=U.useMemo(()=>bb(e),[e]),A=U.useMemo(()=>Eb(E),[E]),T=n1(e),[L,b]=U.useState(()=>Bp(T));U.useEffect(()=>b(Bp(T)),[T]);const R=U.useMemo(()=>i1(e.edges),[e]),$=U.useMemo(()=>o1(R,L),[R,L]),P=U.useCallback((N,F)=>{const G=R.get(N);G&&b(Y=>{const ee={...Y};return F?ee[N]=G:delete ee[N],r1(T,ee),ee})},[R,T]),I=U.useCallback(N=>{x(N),Ed(v,N)},[v]);U.useEffect(()=>{const N=w.filter(F=>Si(E,A.byPath,F)!=="resolved").length;n({open:N,prompt:()=>Wy(E,A.byPath,w,{header:!1}).text})},[w,E,A,n]);const z=U.useCallback(N=>d(F=>{const G=new Set(F);return G.has(N)?G.delete(N):G.add(N),G}),[d]),B=U.useCallback(N=>y(F=>[...F,...N.filter(G=>!F.includes(G))]),[]),W=U.useCallback(N=>y(F=>F.includes(N)?F.filter(G=>G!==N):[...F,N]),[]),M=U.useCallback(N=>{const F=G=>{const Y=new Set(G);if(Y.has(N))for(const ee of[...Y])(ee===N||ee.startsWith(N+"/"))&&Y.delete(ee);else Y.add(N);return Y};m==="all"?l(F):u(F)},[m,l,u]),K=r.includes("file"),S=U.useCallback(N=>{const F=E.fileByPath.get(N);if(!(!K||!F))return F.status==="unchanged"?"ファイルを開く":"差分を開く"},[E,K]),X=U.useMemo(()=>K?N=>i("file",N):null,[K,i]),Z=f1(E.graph.files),_=w.filter(N=>Si(E,A.byPath,N)!=="resolved").length,O=p1(E.graph.edges);return f.jsxs("div",{className:"app",children:[f.jsxs(Nd,{children:[f.jsxs(jd,{children:[f.jsx(bi,{children:"ファイル"}),f.jsx(Dl,{stats:Z,unit:"ファイル",showZero:!0}),f.jsx(_d,{}),f.jsx(bi,{children:"依存"}),f.jsx(Ti,{stats:O,title:Qy(O),showZero:!0})]}),f.jsx(Td,{}),f.jsx($d,{done:$.size,total:R.size,title:"確認済みにした、依存が変わったファイル(依存がまた変わると外れます)"}),f.jsxs("button",{className:`ds-btn${k?" on":""}`,onClick:()=>C(!k),title:"コメントのサイドバーを開閉",children:[f.jsx(_i,{size:13}),"コメント ",w.length,w.length>0&&f.jsxs("span",{className:"muted",children:["(未対応 ",_,")"]})]})]}),f.jsx("main",{children:f.jsx(u1,{model:E,root:A.root,tree:A.byPath,mode:m,onModeChange:N=>{g(N),qy("mapMode",N)},open:m==="all"?s:a,onToggle:M,collapsed:c,onCollapseToggle:z,onExpandAll:()=>d(new Set),onExpandChanged:()=>{const N=new Set(s);for(const F of E.changedDirs)for(const G of Os(F))N.add(G);l(N)},onCollapseAll:()=>m==="all"?l(new Set):u(new Set),pins:p,onTogglePin:W,onClearPins:()=>y([]),onPin:B,reviewTargets:R,reviewed:$,onReviewed:P,comments:w,onCommentsChange:I,sidebarOpen:k,onSidebarOpen:C,active:t,openLabel:S,onOpenFile:X})})]})}const d1=e=>Array.isArray(e)?e.filter(t=>typeof t=="string"):[];function f1(e){const t={added:0,modified:0,removed:0};for(const n of e)n.status!=="unchanged"&&t[n.status]++;return t}function p1(e){const t={added:0,removed:0};for(const n of e)!n.external&&n.status!=="unchanged"&&t[n.status]++;return t}const h1={id:"dep",title:"依存",description:"コードの依存関係(depshape): フォルダ・ファイルの import の変化",icon:t0,View:c1,badge:e=>e.files.filter(t=>t.status!=="unchanged").length||void 0},Zy=(e,t)=>`path=${encodeURIComponent(e)}&side=${t}`;async function Jy(e,t){const n=await fetch(`/api/module/file/content?${Zy(e,t)}`);if(!n.ok)throw new Error(await n.text());return(await n.json()).lines}async function m1(){const e=await fetch("/api/module/file/files");if(!e.ok)throw new Error(await e.text());return(await e.json()).paths}async function g1(e){const t=await fetch(`/api/module/file/plain?path=${encodeURIComponent(e)}`);if(t.status===404)return null;if(!t.ok)throw new Error(await t.text());return await t.json()}const ex=(e,t,n)=>`/api/module/file/raw?${Zy(e,t)}&v=${n}`,y1=/\.(png|jpe?g|gif|webp|avif|bmp|ico|svg)$/i,lc=e=>y1.test(e),x1=e=>/\.(md|markdown|mdx)$/i.test(e),Tr=e=>!!e.file||!!e.plain;function Up(e,t=[]){const n={name:"",path:"",children:[]},r=new Map([[n,new Map]]),i=new Set(e.map(s=>s.path)),o=(s,l)=>{const a=s.split("/");let u=n;for(let c=0;c<a.length-1;c++){const d=r.get(u);let h=d.get(a[c]);h||(h={name:a[c],path:a.slice(0,c+1).join("/"),children:[]},u.children.push(h),d.set(a[c],h),r.set(h,new Map)),u=h}u.children.push({name:a[a.length-1],path:s,children:[],...l})};for(const s of e)o(s.path,{file:s});for(const s of t)i.has(s)||o(s,{plain:!0});return nx(tx(n))}function tx(e){let t={...e,children:e.children.map(tx)};for(;t.path!==""&&!Tr(t)&&t.children.length===1&&!Tr(t.children[0]);){const n=t.children[0];t={...n,name:`${t.name}/${n.name}`}}return t}function nx(e){const t=e.children.map(nx).sort((n,r)=>Tr(n)!==Tr(r)?Tr(n)?1:-1:n.name.localeCompare(r.name));return{...e,children:t}}function rx(e){return e.file?[e.file]:e.children.flatMap(rx)}function ix(e){return Tr(e)?[]:[...e.path?[e.path]:[],...e.children.flatMap(ix)]}function v1(e){const t=new Set,n=r=>{if(Tr(r))return!!r.file&&!r.file.unchanged;let i=!1;for(const o of r.children)n(o)&&(i=!0);return i&&r.path&&t.add(r.path),i};return n(e),t}function ox(e,t){const n=t.trim().toLowerCase();if(!n)return e;if(e.file)return e.file.path.toLowerCase().includes(n)||(e.file.oldPath??"").toLowerCase().includes(n)?e:null;if(e.plain)return e.path.toLowerCase().includes(n)?e:null;const r=e.children.map(i=>ox(i,n)).filter(i=>i!==null);return r.length||e.path===""?{...e,children:r}:null}const Ra=(e,t)=>t===0?e+1:e,Ma=(e,t)=>t===0?e:e+t-1,w1=e=>!e.unchanged&&e.status!=="added"&&e.status!=="removed"&&!e.binary&&!e.large&&e.chunks.length>0;function Hp(e,t){const n={path:e,status:"modified",additions:0,deletions:0,unchanged:!0};if(!t)return{...n,chunks:[],loading:!0};if(t.binary)return{...n,chunks:[],binary:!0};if(t.large||!t.lines)return{...n,chunks:[],large:!0};const r=t.lines.length;if(r===0)return{...n,chunks:[]};const i=t.lines.map((o,s)=>({type:"normal",content:o,oldLine:s+1,newLine:s+1}));return{...n,chunks:[{section:"",oldStart:1,oldLines:r,newStart:1,newLines:r,lines:i}]}}function Ul(e,t){if(!w1(e))return[];const n=e.chunks;return Array.from({length:n.length+1},(r,i)=>{const o=n[i-1],s=n[i],l=o?Ma(o.newStart,o.newLines)+1:1,a=s?Ra(s.newStart,s.newLines)-1:t,u=o?Ma(o.oldStart,o.oldLines)-Ma(o.newStart,o.newLines):Ra(s.oldStart,s.oldLines)-Ra(s.newStart,s.newLines);return{index:i,from:l,to:a,delta:u}})}const kr=20,Wp=(e,t)=>e.to===void 0?void 0:Math.max(0,e.to-e.from+1-((t==null?void 0:t.top)??0)-((t==null?void 0:t.bottom)??0));function k1(e,t,n){if(e.unchanged)return e.chunks.flatMap(l=>l.lines.map(a=>({kind:"line",line:a})));const r=[],i=Ul(e,t==null?void 0:t.length),o=(l,a,u)=>{if(t)for(let c=a;c<=u;c++)t[c-1]!==void 0&&r.push({kind:"line",opened:!0,line:{type:"normal",content:t[c-1],oldLine:c+l.delta,newLine:c}})};e.chunks.forEach((l,a)=>{const u=i[a];if(u){const c=t?n[a]:void 0,d=Wp(u,c),h=Math.min((c==null?void 0:c.top)??0,u.to-u.from+1);o(u,u.from,u.from+h-1),(d>0||a===0)&&r.push({kind:"gap",gap:u,hidden:d,chunk:l}),o(u,u.from+h+d,u.to)}else r.push({kind:"gap",gap:{index:a,from:1,to:0,delta:0},hidden:0,chunk:l});for(const c of l.lines)r.push({kind:"line",line:c})});const s=i[e.chunks.length];if(s){const l=t?n[s.index]:void 0,a=Wp(s,l);t&&o(s,s.from,s.from+((l==null?void 0:l.top)??0)-1),(a===void 0||a>0)&&r.push({kind:"gap",gap:s,hidden:a})}return r}function b1(e,t,n,r){const i=(t.to??r)-t.from+1,o=e[t.index]??{top:0,bottom:0},s=Math.max(0,i-o.top-o.bottom),l=n==="all"?{top:i-o.bottom,bottom:o.bottom}:n==="down"?{...o,top:o.top+Math.min(kr,s)}:{...o,bottom:o.bottom+Math.min(kr,s)};return{...e,[t.index]:l}}function E1(e,t,n,r,i){let o=n;for(const s of Ul(e,t)){const l=s.to??t;if(i<s.from||r>l)continue;const a=o[s.index]??{top:0,bottom:0},u=Math.min(l-s.from+1,Math.max(a.top,Math.min(i,l)-s.from+1+3));u!==a.top&&(o={...o,[s.index]:{...a,top:u}})}return o}function ac(e,t){for(const n of Ul(e)){const r=t-n.delta;if(r>=n.from&&(n.to===void 0||r<=n.to))return r}}function sx(e){const t=[];let n=0;for(;n<e.length;){const r=e[n];if(r.type==="normal"){t.push({old:r,new:r}),n++;continue}const i=[];for(;n<e.length&&e[n].type==="delete";)i.push(e[n++]);const o=[];for(;n<e.length&&e[n].type==="add";)o.push(e[n++]);for(let s=0;s<Math.max(i.length,o.length);s++)t.push({old:i[s],new:o[s]})}return t}const Vp=500,Gp=e=>e.match(/[\p{L}\p{N}_]+|\s+|[^\p{L}\p{N}_\s]/gu)??[];function S1(e,t){if(!e.trim()||!t.trim()||e===t||e.length>Vp||t.length>Vp)return;const n=Gp(e),r=Gp(t),i=r.length+1,o=new Uint16Array((n.length+1)*i);for(let d=n.length-1;d>=0;d--)for(let h=r.length-1;h>=0;h--)o[d*i+h]=n[d]===r[h]?o[(d+1)*i+h+1]+1:Math.max(o[(d+1)*i+h],o[d*i+h+1]);const s=new Array(n.length).fill(!1),l=new Array(r.length).fill(!1);for(let d=0,h=0;d<n.length&&h<r.length;)n[d]===r[h]?(s[d++]=!0,l[h++]=!0):o[(d+1)*i+h]>=o[d*i+h+1]?d++:h++;const a=d=>d.trim().length,u=n.reduce((d,h,p)=>d+(s[p]?a(h):0),0),c=n.reduce((d,h)=>d+a(h),0)+r.reduce((d,h)=>d+a(h),0);if(!(c===0||2*u/c<.4))return{old:Kp(n,s),new:Kp(r,l)}}function Kp(e,t){t=t.map((i,o)=>i&&!(o>0&&o<e.length-1&&!e[o].trim()&&!t[o-1]&&!t[o+1]));const n=[];let r=0;return e.forEach((i,o)=>{const s=r+i.length;if(!t[o]){const l=n[n.length-1];l&&l[1]===r?l[1]=s:n.push([r,s])}r=s}),n}function C1(e){var n,r;const t=new Map;for(const i of sx(e)){if(((n=i.old)==null?void 0:n.type)!=="delete"||((r=i.new)==null?void 0:r.type)!=="add")continue;const o=S1(i.old.content,i.new.content);o&&(t.set(`old:${i.old.oldLine}`,o.old),t.set(`new:${i.new.newLine}`,o.new))}return t}function N1(e,t){if(!t.length)return e;const n=[];let r=0;for(const i of e){const o=r+i.text.length;let s=r;for(const[l,a]of t){if(a<=s||l>=o)continue;l>s&&n.push({...i,text:i.text.slice(s-r,l-r)});const u=Math.min(a,o);n.push({...i,text:i.text.slice(Math.max(l,s)-r,u-r),mark:!0}),s=u}s<o&&n.push({...i,text:i.text.slice(s-r)}),r=o}return n}function j1(e){return so([e.status,e.oldPath??"",e.modeChange??"",e.binary?"binary":"",e.chunks.map(t=>t.lines.filter(n=>n.type!=="normal").map(n=>`${n.type==="add"?"+":"-"}${n.content}`))])}const lx=e=>e.chunks.reduce((t,n)=>t+n.lines.length,0);function _1(e){const t={added:0,modified:0,removed:0};for(const n of e)t[n.status==="renamed"?"modified":n.status]++;return t}function T1(e){return e.reduce((t,n)=>({added:t.added+n.additions,removed:t.removed+n.deletions}),{added:0,removed:0})}function Rd(e,t,n){const r=new Map;n&&t==="new"&&n.forEach((i,o)=>r.set(o+1,i));for(const i of e.chunks)for(const o of i.lines)t==="old"&&o.type!=="add"&&r.set(o.oldLine,o.content),t==="new"&&o.type!=="delete"&&r.set(o.newLine,o.content);if(n&&t==="old"){const i=Math.max(0,...e.chunks.map(o=>o.oldStart+o.oldLines))+n.length;for(let o=1;o<=i;o++){if(r.has(o))continue;const s=ac(e,o);s!==void 0&&n[s-1]!==void 0&&r.set(o,n[s-1])}}return r}const ax=e=>(e.endLine??e.line)-e.line+1;function Lo(e,t,n){if(!e)return{state:"resolved"};const r=Rd(e,t.side,n),i=t.code.split(`
|
|
96
|
+
`),o=ax(t),s=u=>i.every((c,d)=>r.get(u+d)===c),l=(u,c)=>({state:c,line:u,...o>1?{endLine:u+o-1}:{}});if(s(t.line))return l(t.line,"open");let a;for(const[u,c]of r)c===i[0]&&s(u)&&(a===void 0||Math.abs(u-t.line)<Math.abs(a-t.line))&&(a=u);return a!==void 0?l(a,"open"):r.has(t.line)?l(t.line,"updated"):{state:"resolved"}}function qp(e,t){const n=Rd(e,t.side);for(let r=t.line;r<=(t.endLine??t.line);r++)if(!n.has(r))return!1;return!0}const dn=(e,t)=>e.files.find(n=>n.path===t),$1=(e,t,n)=>Lo(dn(e,t.path),t,n).state;function I1(e,t,n=!1){return{id:hy(),path:e.path,side:e.side,line:e.line,...e.endLine&&e.endLine!==e.line?{endLine:e.endLine}:{},code:e.code,body:t,createdAt:Date.now(),...n?{unchanged:!0}:{}}}const uc=(e,t,n,r)=>`${e}:L${n}${r&&r!==n?`-L${r}`:""}${t==="old"?" (old)":""}`,L1={old:"変更前",new:"変更後"},ml=(e,t,n,r)=>{const i=`${n&&n!==t?`${t}〜${n}`:t} 行目`;return r?`${i}(変更なし)`:`${L1[e]}の ${i}`},Pa=(e,t)=>{const n=t.split(`
|
|
97
|
+
`);return n.length===1?[` ${e}: ${t.trim()}`]:[` ${e}:`," ```",...n.map(r=>` ${r}`)," ```"]};function ux(e,t,n={}){const r=t.map(s=>{var l;return{c:s,at:Lo(dn(e,s.path),s,(l=n.contents)==null?void 0:l.get(s.path))}}),i=n.includeResolved?r:r.filter(s=>s.at.state!=="resolved"),o=n.header===!1?[]:[...Fl(e),"対象: ファイルの差分(fileshape)",""];return i.forEach(({c:s,at:l},a)=>{var d;const u=l.line??s.line,c=l.line!==void 0?l.endLine:s.endLine;if(o.push(`${a+1}. ${uc(s.path,s.side,u,c)}(${ml(s.side,u,c,s.unchanged)})${l.state==="resolved"?"(解消済み?)":""}`),l.state==="updated"){const h=Rd(dn(e,s.path),s.side,(d=n.contents)==null?void 0:d.get(s.path)),p=Array.from({length:ax(s)},(y,v)=>h.get(u+v)??"").join(`
|
|
98
|
+
`);o.push(...Pa("コード",p),...Pa("コメントしたときは",s.code))}else o.push(...Pa("コード",s.code));o.push(` コメント: ${s.body.trim().replace(/\n/g,`
|
|
99
|
+
`)}`,"")}),{text:o.join(`
|
|
100
|
+
`).trimEnd()+`
|
|
101
|
+
`,included:i.length,skipped:t.length-i.length}}const cx="fileshape.comments:",A1=e=>bd(cx+e),O1=(e,t)=>Ed(cx+e,t),dx=U.createContext(null),Md=()=>U.useContext(dx),Vr=(e,t)=>`${e}:${t}`;function R1({comments:e,composing:t}){var r;const n=Md();return f.jsxs("div",{className:"fs-thread",children:[e.map(i=>n.editing===i.id?f.jsx(cc,{initial:i.body,label:ml(i.side,i.line,i.endLine,i.unchanged),onSave:o=>n.update(i.id,o),onCancel:()=>n.edit(null)},i.id):f.jsx(Pd,{c:i},i.id)),t&&f.jsx(cc,{initial:"",label:ml(t.side,t.line,t.endLine,!!((r=dn(n.run,t.path))!=null&&r.unchanged)),onSave:i=>n.add(t,i),onCancel:()=>n.compose(null)})]})}function Pd({c:e,showWhere:t}){const n=Md(),r=Lo(dn(n.run,e.path),e,n.contents.get(e.path));if(t&&n.editing===e.id)return f.jsx(cc,{initial:e.body,label:uc(e.path,e.side,e.line,e.endLine),onSave:o=>n.update(e.id,o),onCancel:()=>n.edit(null)});const i=e.endLine!==void 0&&e.endLine!==e.line;return f.jsx(Sd,{body:e.body,state:r.state,top:t?f.jsxs("span",{className:"fs-comment-where",children:[uc(e.path,e.side,e.line,e.endLine)," ",f.jsx("code",{children:e.code.split(`
|
|
102
|
+
`)[0].trim()||"(空行)"}),i&&f.jsx("span",{className:"ds-muted",children:" ほか"})]}):i?f.jsx("span",{className:"ds-muted",children:ml(e.side,r.line??e.line,r.line!==void 0?r.endLine:e.endLine,e.unchanged)}):void 0,stateTitle:r.state==="updated"?`コメントしたときは: ${e.code.trim()}`:r.state==="resolved"?"この行は差分からなくなりました":void 0,onCopy:()=>Do(ux(n.run,[e],{includeResolved:!0,contents:n.contents}).text),onEdit:()=>n.edit(e.id),onDelete:()=>n.remove(e.id)})}function cc({initial:e,label:t,onSave:n,onCancel:r}){const[i,o]=U.useState(e);return f.jsx(Cd,{autoFocus:!0,editing:e!=="",top:f.jsxs("span",{className:"ds-muted",children:[t,e===""&&"(行番号を Shift+クリックかドラッグすると範囲になります)"]}),value:i,placeholder:"気になる点や直してほしいこと",onChange:o,onSave:()=>i.trim()&&n(i.trim()),onCancel:r})}const M1=e=>Math.min(e.a,e.b),P1=e=>Math.max(e.a,e.b),Ui=(e,t)=>e==="old"?t.type!=="add"?t.oldLine:void 0:t.type!=="delete"?t.newLine:void 0,F1=U.memo(function({file:t,mode:n,rows:r,tokens:i,byLine:o,onExpand:s}){var R;const l=Md(),a=((R=l.composing)==null?void 0:R.path)===t.path?l.composing:null,u=U.useMemo(()=>{const $=new Map;for(const P of t.chunks)for(const[I,z]of C1(P.lines))$.set(I,z);return $},[t]),c=U.useMemo(()=>{const $={old:new Map,new:new Map};for(const P of r)if(P.kind==="line")for(const I of["old","new"]){const z=Ui(I,P.line);z!==void 0&&$[I].set(z,P.line.content)}return $},[r]),d=($,P,I)=>{const z=Math.min(P,I),B=Math.max(P,I),W=[];let M=z;for(let K=z;K<=B;K++){const S=c[$].get(K);if(S===void 0)break;W.push(S),M=K}return{path:t.path,side:$,line:z,...M>z?{endLine:M}:{},code:W.join(`
|
|
103
|
+
`)}},[h,p]=U.useState(null),y=U.useRef(null);y.current=h;const v=U.useRef(()=>{});v.current=()=>{const $=y.current;p(null),$&&l.compose(d($.side,$.a,$.b))};const w=h!==null;U.useEffect(()=>{if(!w)return;const $=()=>v.current();return window.addEventListener("mouseup",$),()=>window.removeEventListener("mouseup",$)},[w]);const x=h??(a?{side:a.side,a:a.line,b:a.endLine??a.line}:null),m=($,P)=>!!x&&P!==void 0&&x.side===$&&P>=M1(x)&&P<=P1(x),g=($,P)=>{const I=P?Ui($,P):void 0;return!P||I===void 0?f.jsx("td",{className:"fs-num empty"}):f.jsx("td",{className:`fs-num${m($,I)?" selected":""}`,onMouseDown:z=>{if(z.button===0){if(z.preventDefault(),z.shiftKey&&a&&a.side===$){l.compose(d($,a.line,I));return}p({side:$,a:I,b:I})}},onMouseEnter:()=>{y.current&&y.current.side===$&&p({...y.current,b:I})},title:`${$==="old"?"変更前":"変更後"}の ${I} 行目にコメントする(Shift+クリックかドラッグで範囲)`,children:I})},k=($,P)=>{const I=Ui($,P),z=(P.type==="normal"?(i==null?void 0:i.get(Vr("new",P.newLine)))??(i==null?void 0:i.get(Vr("old",P.oldLine))):i==null?void 0:i.get(Vr($,I)))??[{types:"",text:P.content}];return N1(z,u.get(Vr($,I))??[]).map((W,M)=>{const K=[W.types?`token ${W.types}`:"",W.mark?`fs-word ${$}`:""].filter(Boolean).join(" ");return K?f.jsx("span",{className:K,children:W.text},M):f.jsx(U.Fragment,{children:W.text},M)})},C=($,P)=>{const I=[...new Set($.flatMap(([W,M])=>o.get(Vr(W,M))??[]))],z=a?a.endLine??a.line:void 0,B=a&&$.some(([W,M])=>a.side===W&&z===M)?a:void 0;return!I.length&&!B?null:f.jsx("tr",{className:"fs-thread-row",children:f.jsx("td",{colSpan:P,children:f.jsx(R1,{comments:I,composing:B})})})},E=($,P,I)=>{const{gap:z,hidden:B,chunk:W}=$,M=z.index>0,K=!!W,S=(Z,_,O)=>f.jsx("button",{className:"fs-expand",onClick:()=>s(z,Z),title:O,"aria-label":O,children:_}),X=B===void 0||B>0;return f.jsx("tr",{className:"fs-hunk",children:f.jsxs("td",{colSpan:P,children:[f.jsx("span",{className:"fs-expanders",children:X&&(B!==void 0&&B<=kr&&M&&K?S("all","↕",`${B} 行をすべて表示`):[K&&S("up","↑",`上の ${Math.min(kr,B??kr)} 行を表示`),M&&S("down","↓",B===void 0?"下の行を表示":`下の ${Math.min(kr,B)} 行を表示`),B!==void 0&&B>kr&&S("all","⇕",`${B} 行をすべて表示`)].filter(Boolean).map((Z,_)=>f.jsx(U.Fragment,{children:Z},_)))}),W?f.jsxs(f.Fragment,{children:["@@ -",W.oldStart,",",W.oldLines," +",W.newStart,",",W.newLines," @@",W.section&&f.jsxs("span",{className:"fs-hunk-section",children:[" ",W.section]})]}):f.jsx("span",{children:B===void 0?"ファイルの残りを表示":`残り ${B} 行`})]})},`g${I}`)};if(n==="unified"){const $=!!t.unchanged,P=$?3:4;return f.jsxs("table",{className:`fs-table unified${$?" plain":""}`,children:[f.jsxs("colgroup",{children:[!$&&f.jsx("col",{className:"fs-col-num"}),f.jsx("col",{className:"fs-col-num"}),f.jsx("col",{className:"fs-col-sign"}),f.jsx("col",{})]}),f.jsx("tbody",{children:r.map((I,z)=>{if(I.kind==="gap")return E(I,P,z);const B=I.line,W=B.type==="delete"?"old":"new",M=$?[["new",B.newLine]]:B.type==="normal"?[["old",B.oldLine],["new",B.newLine]]:[[W,Ui(W,B)]],K=M.some(([S,X])=>m(S,X));return f.jsxs(U.Fragment,{children:[f.jsxs("tr",{className:`fs-line ${B.type}${I.opened?" opened":""}${K?" selected":""}`,children:[!$&&g("old",B.type==="add"?void 0:B),g("new",B.type==="delete"?void 0:B),f.jsx("td",{className:"fs-sign",children:B.type==="add"?"+":B.type==="delete"?"-":" "}),f.jsx("td",{className:"fs-code",children:k(W,B)})]}),C(M,P)]},z)})})]})}const A=[];let T=[],L=new Set;const b=()=>{sx(T).forEach(($,P)=>{var B,W;const I=[];$.old&&I.push(["old",$.old.oldLine]),$.new&&I.push(["new",$.new.newLine]);const z=(M,K)=>`${M?M.type:"empty"}${M&&m(K,Ui(K,M))?" selected":""}`;A.push(f.jsxs(U.Fragment,{children:[f.jsxs("tr",{className:`fs-line${$.old&&L.has($.old)?" opened":""}`,children:[g("old",$.old),f.jsx("td",{className:`fs-sign ${z($.old,"old")}`,children:((B=$.old)==null?void 0:B.type)==="delete"?"-":" "}),f.jsx("td",{className:`fs-code ${z($.old,"old")}`,children:$.old&&k("old",$.old)}),g("new",$.new),f.jsx("td",{className:`fs-sign ${z($.new,"new")}`,children:((W=$.new)==null?void 0:W.type)==="add"?"+":" "}),f.jsx("td",{className:`fs-code ${z($.new,"new")}`,children:$.new&&k("new",$.new)})]}),C(I,6)]},`l${A.length}-${P}`))}),T=[],L=new Set};return r.forEach(($,P)=>{$.kind==="gap"?(b(),A.push(E($,6,P))):(T.push($.line),$.opened&&L.add($.line))}),b(),f.jsxs("table",{className:"fs-table split",children:[f.jsxs("colgroup",{children:[f.jsx("col",{className:"fs-col-num"}),f.jsx("col",{className:"fs-col-sign"}),f.jsx("col",{className:"fs-col-half"}),f.jsx("col",{className:"fs-col-num"}),f.jsx("col",{className:"fs-col-sign"}),f.jsx("col",{className:"fs-col-half"})]}),f.jsx("tbody",{children:A})]})});var fx={exports:{}};(function(e){var t=typeof window<"u"?window:typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope?self:{};/**
|
|
104
|
+
* Prism: Lightweight, robust, elegant syntax highlighting
|
|
105
|
+
*
|
|
106
|
+
* @license MIT <https://opensource.org/licenses/MIT>
|
|
107
|
+
* @author Lea Verou <https://lea.verou.me>
|
|
108
|
+
* @namespace
|
|
109
|
+
* @public
|
|
110
|
+
*/var n=function(r){var i=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,o=0,s={},l={manual:r.Prism&&r.Prism.manual,disableWorkerMessageHandler:r.Prism&&r.Prism.disableWorkerMessageHandler,util:{encode:function m(g){return g instanceof a?new a(g.type,m(g.content),g.alias):Array.isArray(g)?g.map(m):g.replace(/&/g,"&").replace(/</g,"<").replace(/\u00a0/g," ")},type:function(m){return Object.prototype.toString.call(m).slice(8,-1)},objId:function(m){return m.__id||Object.defineProperty(m,"__id",{value:++o}),m.__id},clone:function m(g,k){k=k||{};var C,E;switch(l.util.type(g)){case"Object":if(E=l.util.objId(g),k[E])return k[E];C={},k[E]=C;for(var A in g)g.hasOwnProperty(A)&&(C[A]=m(g[A],k));return C;case"Array":return E=l.util.objId(g),k[E]?k[E]:(C=[],k[E]=C,g.forEach(function(T,L){C[L]=m(T,k)}),C);default:return g}},getLanguage:function(m){for(;m;){var g=i.exec(m.className);if(g)return g[1].toLowerCase();m=m.parentElement}return"none"},setLanguage:function(m,g){m.className=m.className.replace(RegExp(i,"gi"),""),m.classList.add("language-"+g)},currentScript:function(){if(typeof document>"u")return null;if(document.currentScript&&document.currentScript.tagName==="SCRIPT")return document.currentScript;try{throw new Error}catch(C){var m=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(C.stack)||[])[1];if(m){var g=document.getElementsByTagName("script");for(var k in g)if(g[k].src==m)return g[k]}return null}},isActive:function(m,g,k){for(var C="no-"+g;m;){var E=m.classList;if(E.contains(g))return!0;if(E.contains(C))return!1;m=m.parentElement}return!!k}},languages:{plain:s,plaintext:s,text:s,txt:s,extend:function(m,g){var k=l.util.clone(l.languages[m]);for(var C in g)k[C]=g[C];return k},insertBefore:function(m,g,k,C){C=C||l.languages;var E=C[m],A={};for(var T in E)if(E.hasOwnProperty(T)){if(T==g)for(var L in k)k.hasOwnProperty(L)&&(A[L]=k[L]);k.hasOwnProperty(T)||(A[T]=E[T])}var b=C[m];return C[m]=A,l.languages.DFS(l.languages,function(R,$){$===b&&R!=m&&(this[R]=A)}),A},DFS:function m(g,k,C,E){E=E||{};var A=l.util.objId;for(var T in g)if(g.hasOwnProperty(T)){k.call(g,T,g[T],C||T);var L=g[T],b=l.util.type(L);b==="Object"&&!E[A(L)]?(E[A(L)]=!0,m(L,k,null,E)):b==="Array"&&!E[A(L)]&&(E[A(L)]=!0,m(L,k,T,E))}}},plugins:{},highlightAll:function(m,g){l.highlightAllUnder(document,m,g)},highlightAllUnder:function(m,g,k){var C={callback:k,container:m,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};l.hooks.run("before-highlightall",C),C.elements=Array.prototype.slice.apply(C.container.querySelectorAll(C.selector)),l.hooks.run("before-all-elements-highlight",C);for(var E=0,A;A=C.elements[E++];)l.highlightElement(A,g===!0,C.callback)},highlightElement:function(m,g,k){var C=l.util.getLanguage(m),E=l.languages[C];l.util.setLanguage(m,C);var A=m.parentElement;A&&A.nodeName.toLowerCase()==="pre"&&l.util.setLanguage(A,C);var T=m.textContent,L={element:m,language:C,grammar:E,code:T};function b($){L.highlightedCode=$,l.hooks.run("before-insert",L),L.element.innerHTML=L.highlightedCode,l.hooks.run("after-highlight",L),l.hooks.run("complete",L),k&&k.call(L.element)}if(l.hooks.run("before-sanity-check",L),A=L.element.parentElement,A&&A.nodeName.toLowerCase()==="pre"&&!A.hasAttribute("tabindex")&&A.setAttribute("tabindex","0"),!L.code){l.hooks.run("complete",L),k&&k.call(L.element);return}if(l.hooks.run("before-highlight",L),!L.grammar){b(l.util.encode(L.code));return}if(g&&r.Worker){var R=new Worker(l.filename);R.onmessage=function($){b($.data)},R.postMessage(JSON.stringify({language:L.language,code:L.code,immediateClose:!0}))}else b(l.highlight(L.code,L.grammar,L.language))},highlight:function(m,g,k){var C={code:m,grammar:g,language:k};if(l.hooks.run("before-tokenize",C),!C.grammar)throw new Error('The language "'+C.language+'" has no grammar.');return C.tokens=l.tokenize(C.code,C.grammar),l.hooks.run("after-tokenize",C),a.stringify(l.util.encode(C.tokens),C.language)},tokenize:function(m,g){var k=g.rest;if(k){for(var C in k)g[C]=k[C];delete g.rest}var E=new d;return h(E,E.head,m),c(m,E,g,E.head,0),y(E)},hooks:{all:{},add:function(m,g){var k=l.hooks.all;k[m]=k[m]||[],k[m].push(g)},run:function(m,g){var k=l.hooks.all[m];if(!(!k||!k.length))for(var C=0,E;E=k[C++];)E(g)}},Token:a};r.Prism=l;function a(m,g,k,C){this.type=m,this.content=g,this.alias=k,this.length=(C||"").length|0}a.stringify=function m(g,k){if(typeof g=="string")return g;if(Array.isArray(g)){var C="";return g.forEach(function(b){C+=m(b,k)}),C}var E={type:g.type,content:m(g.content,k),tag:"span",classes:["token",g.type],attributes:{},language:k},A=g.alias;A&&(Array.isArray(A)?Array.prototype.push.apply(E.classes,A):E.classes.push(A)),l.hooks.run("wrap",E);var T="";for(var L in E.attributes)T+=" "+L+'="'+(E.attributes[L]||"").replace(/"/g,""")+'"';return"<"+E.tag+' class="'+E.classes.join(" ")+'"'+T+">"+E.content+"</"+E.tag+">"};function u(m,g,k,C){m.lastIndex=g;var E=m.exec(k);if(E&&C&&E[1]){var A=E[1].length;E.index+=A,E[0]=E[0].slice(A)}return E}function c(m,g,k,C,E,A){for(var T in k)if(!(!k.hasOwnProperty(T)||!k[T])){var L=k[T];L=Array.isArray(L)?L:[L];for(var b=0;b<L.length;++b){if(A&&A.cause==T+","+b)return;var R=L[b],$=R.inside,P=!!R.lookbehind,I=!!R.greedy,z=R.alias;if(I&&!R.pattern.global){var B=R.pattern.toString().match(/[imsuy]*$/)[0];R.pattern=RegExp(R.pattern.source,B+"g")}for(var W=R.pattern||R,M=C.next,K=E;M!==g.tail&&!(A&&K>=A.reach);K+=M.value.length,M=M.next){var S=M.value;if(g.length>m.length)return;if(!(S instanceof a)){var X=1,Z;if(I){if(Z=u(W,K,m,P),!Z||Z.index>=m.length)break;var F=Z.index,_=Z.index+Z[0].length,O=K;for(O+=M.value.length;F>=O;)M=M.next,O+=M.value.length;if(O-=M.value.length,K=O,M.value instanceof a)continue;for(var N=M;N!==g.tail&&(O<_||typeof N.value=="string");N=N.next)X++,O+=N.value.length;X--,S=m.slice(K,O),Z.index-=K}else if(Z=u(W,0,S,P),!Z)continue;var F=Z.index,G=Z[0],Y=S.slice(0,F),ee=S.slice(F+G.length),D=K+S.length;A&&D>A.reach&&(A.reach=D);var te=M.prev;Y&&(te=h(g,te,Y),K+=Y.length),p(g,te,X);var ae=new a(T,$?l.tokenize(G,$):G,z,G);if(M=h(g,te,ae),ee&&h(g,M,ee),X>1){var Fe={cause:T+","+b,reach:D};c(m,g,k,M.prev,K,Fe),A&&Fe.reach>A.reach&&(A.reach=Fe.reach)}}}}}}function d(){var m={value:null,prev:null,next:null},g={value:null,prev:m,next:null};m.next=g,this.head=m,this.tail=g,this.length=0}function h(m,g,k){var C=g.next,E={value:k,prev:g,next:C};return g.next=E,C.prev=E,m.length++,E}function p(m,g,k){for(var C=g.next,E=0;E<k&&C!==m.tail;E++)C=C.next;g.next=C,C.prev=g,m.length-=E}function y(m){for(var g=[],k=m.head.next;k!==m.tail;)g.push(k.value),k=k.next;return g}if(!r.document)return r.addEventListener&&(l.disableWorkerMessageHandler||r.addEventListener("message",function(m){var g=JSON.parse(m.data),k=g.language,C=g.code,E=g.immediateClose;r.postMessage(l.highlight(C,l.languages[k],k)),E&&r.close()},!1)),l;var v=l.util.currentScript();v&&(l.filename=v.src,v.hasAttribute("data-manual")&&(l.manual=!0));function w(){l.manual||l.highlightAll()}if(!l.manual){var x=document.readyState;x==="loading"||x==="interactive"&&v&&v.defer?document.addEventListener("DOMContentLoaded",w):window.requestAnimationFrame?window.requestAnimationFrame(w):window.setTimeout(w,16)}return l}(t);e.exports&&(e.exports=n),typeof af<"u"&&(af.Prism=n),n.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},n.languages.markup.tag.inside["attr-value"].inside.entity=n.languages.markup.entity,n.languages.markup.doctype.inside["internal-subset"].inside=n.languages.markup,n.hooks.add("wrap",function(r){r.type==="entity"&&(r.attributes.title=r.content.replace(/&/,"&"))}),Object.defineProperty(n.languages.markup.tag,"addInlined",{value:function(i,o){var s={};s["language-"+o]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:n.languages[o]},s.cdata=/^<!\[CDATA\[|\]\]>$/i;var l={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:s}};l["language-"+o]={pattern:/[\s\S]+/,inside:n.languages[o]};var a={};a[i]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,function(){return i}),"i"),lookbehind:!0,greedy:!0,inside:l},n.languages.insertBefore("markup","cdata",a)}}),Object.defineProperty(n.languages.markup.tag,"addAttribute",{value:function(r,i){n.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+r+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[i,"language-"+i],inside:n.languages[i]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),n.languages.html=n.languages.markup,n.languages.mathml=n.languages.markup,n.languages.svg=n.languages.markup,n.languages.xml=n.languages.extend("markup",{}),n.languages.ssml=n.languages.xml,n.languages.atom=n.languages.xml,n.languages.rss=n.languages.xml,function(r){var i=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;r.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+i.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+i.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+i.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+i.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:i,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},r.languages.css.atrule.inside.rest=r.languages.css;var o=r.languages.markup;o&&(o.tag.addInlined("style","css"),o.tag.addAttribute("style","css"))}(n),n.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},n.languages.javascript=n.languages.extend("clike",{"class-name":[n.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+(/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source)+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),n.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,n.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:n.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:n.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:n.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:n.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:n.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),n.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:n.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),n.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),n.languages.markup&&(n.languages.markup.tag.addInlined("script","javascript"),n.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),n.languages.js=n.languages.javascript,function(){if(typeof n>"u"||typeof document>"u")return;Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector);var r="Loading…",i=function(v,w){return"✖ Error "+v+" while fetching file: "+w},o="✖ Error: File does not exist or is empty",s={js:"javascript",py:"python",rb:"ruby",ps1:"powershell",psm1:"powershell",sh:"bash",bat:"batch",h:"c",tex:"latex"},l="data-src-status",a="loading",u="loaded",c="failed",d="pre[data-src]:not(["+l+'="'+u+'"]):not(['+l+'="'+a+'"])';function h(v,w,x){var m=new XMLHttpRequest;m.open("GET",v,!0),m.onreadystatechange=function(){m.readyState==4&&(m.status<400&&m.responseText?w(m.responseText):m.status>=400?x(i(m.status,m.statusText)):x(o))},m.send(null)}function p(v){var w=/^\s*(\d+)\s*(?:(,)\s*(?:(\d+)\s*)?)?$/.exec(v||"");if(w){var x=Number(w[1]),m=w[2],g=w[3];return m?g?[x,Number(g)]:[x,void 0]:[x,x]}}n.hooks.add("before-highlightall",function(v){v.selector+=", "+d}),n.hooks.add("before-sanity-check",function(v){var w=v.element;if(w.matches(d)){v.code="",w.setAttribute(l,a);var x=w.appendChild(document.createElement("CODE"));x.textContent=r;var m=w.getAttribute("data-src"),g=v.language;if(g==="none"){var k=(/\.(\w+)$/.exec(m)||[,"none"])[1];g=s[k]||k}n.util.setLanguage(x,g),n.util.setLanguage(w,g);var C=n.plugins.autoloader;C&&C.loadLanguages(g),h(m,function(E){w.setAttribute(l,u);var A=p(w.getAttribute("data-range"));if(A){var T=E.split(/\r\n?|\n/g),L=A[0],b=A[1]==null?T.length:A[1];L<0&&(L+=T.length),L=Math.max(0,Math.min(L-1,T.length)),b<0&&(b+=T.length),b=Math.max(0,Math.min(b,T.length)),E=T.slice(L,b).join(`
|
|
111
|
+
`),w.hasAttribute("data-start")||w.setAttribute("data-start",String(L+1))}x.textContent=E,n.highlightElement(x)},function(E){w.setAttribute(l,c),x.textContent=E})}}),n.plugins.fileHighlight={highlight:function(w){for(var x=(w||document).querySelectorAll(d),m=0,g;g=x[m++];)n.highlightElement(g)}};var y=!1;n.fileHighlight=function(){y||(console.warn("Prism.fileHighlight is deprecated. Use `Prism.plugins.fileHighlight.highlight` instead."),y=!0),n.plugins.fileHighlight.highlight.apply(this,arguments)}}()})(fx);var D1=fx.exports;const gl=Qh(D1);(function(e){e.languages.typescript=e.languages.extend("javascript",{"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|type)\s+)(?!keyof\b)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?:\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,lookbehind:!0,greedy:!0,inside:null},builtin:/\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\b/}),e.languages.typescript.keyword.push(/\b(?:abstract|declare|is|keyof|readonly|require)\b/,/\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/,/\btype\b(?=\s*(?:[\{*]|$))/),delete e.languages.typescript.parameter,delete e.languages.typescript["literal-property"];var t=e.languages.extend("typescript",{});delete t["class-name"],e.languages.typescript["class-name"].inside=t,e.languages.insertBefore("typescript","function",{decorator:{pattern:/@[$\w\xA0-\uFFFF]+/,inside:{at:{pattern:/^@/,alias:"operator"},function:/^[\s\S]+/}},"generic-function":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/,greedy:!0,inside:{function:/^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:t}}}}),e.languages.ts=e.languages.typescript})(Prism);(function(e){var t=e.util.clone(e.languages.javascript),n=/(?:\s|\/\/.*(?!.)|\/\*(?:[^*]|\*(?!\/))\*\/)/.source,r=/(?:\{(?:\{(?:\{[^{}]*\}|[^{}])*\}|[^{}])*\})/.source,i=/(?:\{<S>*\.{3}(?:[^{}]|<BRACES>)*\})/.source;function o(a,u){return a=a.replace(/<S>/g,function(){return n}).replace(/<BRACES>/g,function(){return r}).replace(/<SPREAD>/g,function(){return i}),RegExp(a,u)}i=o(i).source,e.languages.jsx=e.languages.extend("markup",t),e.languages.jsx.tag.pattern=o(/<\/?(?:[\w.:-]+(?:<S>+(?:[\w.:$-]+(?:=(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s{'"/>=]+|<BRACES>))?|<SPREAD>))*<S>*\/?)?>/.source),e.languages.jsx.tag.inside.tag.pattern=/^<\/?[^\s>\/]*/,e.languages.jsx.tag.inside["attr-value"].pattern=/=(?!\{)(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s'">]+)/,e.languages.jsx.tag.inside.tag.inside["class-name"]=/^[A-Z]\w*(?:\.[A-Z]\w*)*$/,e.languages.jsx.tag.inside.comment=t.comment,e.languages.insertBefore("inside","attr-name",{spread:{pattern:o(/<SPREAD>/.source),inside:e.languages.jsx}},e.languages.jsx.tag),e.languages.insertBefore("inside","special-attr",{script:{pattern:o(/=<BRACES>/.source),alias:"language-javascript",inside:{"script-punctuation":{pattern:/^=(?=\{)/,alias:"punctuation"},rest:e.languages.jsx}}},e.languages.jsx.tag);var s=function(a){return a?typeof a=="string"?a:typeof a.content=="string"?a.content:a.content.map(s).join(""):""},l=function(a){for(var u=[],c=0;c<a.length;c++){var d=a[c],h=!1;if(typeof d!="string"&&(d.type==="tag"&&d.content[0]&&d.content[0].type==="tag"?d.content[0].content[0].content==="</"?u.length>0&&u[u.length-1].tagName===s(d.content[0].content[1])&&u.pop():d.content[d.content.length-1].content==="/>"||u.push({tagName:s(d.content[0].content[1]),openedBraces:0}):u.length>0&&d.type==="punctuation"&&d.content==="{"?u[u.length-1].openedBraces++:u.length>0&&u[u.length-1].openedBraces>0&&d.type==="punctuation"&&d.content==="}"?u[u.length-1].openedBraces--:h=!0),(h||typeof d=="string")&&u.length>0&&u[u.length-1].openedBraces===0){var p=s(d);c<a.length-1&&(typeof a[c+1]=="string"||a[c+1].type==="plain-text")&&(p+=s(a[c+1]),a.splice(c+1,1)),c>0&&(typeof a[c-1]=="string"||a[c-1].type==="plain-text")&&(p=s(a[c-1])+p,a.splice(c-1,1),c--),a[c]=new e.Token("plain-text",p,null,p)}d.content&&typeof d.content!="string"&&l(d.content)}};e.hooks.add("after-tokenize",function(a){a.language!=="jsx"&&a.language!=="tsx"||l(a.tokens)})})(Prism);(function(e){var t=e.util.clone(e.languages.typescript);e.languages.tsx=e.languages.extend("jsx",t),delete e.languages.tsx.parameter,delete e.languages.tsx["literal-property"];var n=e.languages.tsx.tag;n.pattern=RegExp(/(^|[^\w$]|(?=<\/))/.source+"(?:"+n.pattern.source+")",n.pattern.flags),n.lookbehind=!0})(Prism);Prism.languages.go=Prism.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"|`[^`]*`/,lookbehind:!0,greedy:!0},keyword:/\b(?:break|case|chan|const|continue|default|defer|else|fallthrough|for|func|go(?:to)?|if|import|interface|map|package|range|return|select|struct|switch|type|var)\b/,boolean:/\b(?:_|false|iota|nil|true)\b/,number:[/\b0(?:b[01_]+|o[0-7_]+)i?\b/i,/\b0x(?:[a-f\d_]+(?:\.[a-f\d_]*)?|\.[a-f\d_]+)(?:p[+-]?\d+(?:_\d+)*)?i?(?!\w)/i,/(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?[\d_]+)?i?(?!\w)/i],operator:/[*\/%^!=]=?|\+[=+]?|-[=-]?|\|[=|]?|&(?:=|&|\^=?)?|>(?:>=?|=)?|<(?:<=?|=|-)?|:=|\.\.\./,builtin:/\b(?:append|bool|byte|cap|close|complex|complex(?:64|128)|copy|delete|error|float(?:32|64)|u?int(?:8|16|32|64)?|imag|len|make|new|panic|print(?:ln)?|real|recover|rune|string|uintptr)\b/});Prism.languages.insertBefore("go","string",{char:{pattern:/'(?:\\.|[^'\\\r\n]){0,10}'/,greedy:!0}});delete Prism.languages.go["class-name"];Prism.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0,greedy:!0},"string-interpolation":{pattern:/(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=\}$)/,lookbehind:!0},"conversion-option":{pattern://,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^[\t ]*)@\w+(?:\.\w+)*/m,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:False|None|True)\b/,number:/\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,operator:/[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/};Prism.languages.python["string-interpolation"].inside.interpolation.inside.rest=Prism.languages.python;Prism.languages.py=Prism.languages.python;(function(e){for(var t=/\/\*(?:[^*/]|\*(?!\/)|\/(?!\*)|<self>)*\*\//.source,n=0;n<2;n++)t=t.replace(/<self>/g,function(){return t});t=t.replace(/<self>/g,function(){return/[^\s\S]/.source}),e.languages.rust={comment:[{pattern:RegExp(/(^|[^\\])/.source+t),lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/b?"(?:\\[\s\S]|[^\\"])*"|b?r(#*)"(?:[^"]|"(?!\1))*"\1/,greedy:!0},char:{pattern:/b?'(?:\\(?:x[0-7][\da-fA-F]|u\{(?:[\da-fA-F]_*){1,6}\}|.)|[^\\\r\n\t'])'/,greedy:!0},attribute:{pattern:/#!?\[(?:[^\[\]"]|"(?:\\[\s\S]|[^\\"])*")*\]/,greedy:!0,alias:"attr-name",inside:{string:null}},"closure-params":{pattern:/([=(,:]\s*|\bmove\s*)\|[^|]*\||\|[^|]*\|(?=\s*(?:\{|->))/,lookbehind:!0,greedy:!0,inside:{"closure-punctuation":{pattern:/^\||\|$/,alias:"punctuation"},rest:null}},"lifetime-annotation":{pattern:/'\w+/,alias:"symbol"},"fragment-specifier":{pattern:/(\$\w+:)[a-z]+/,lookbehind:!0,alias:"punctuation"},variable:/\$\w+/,"function-definition":{pattern:/(\bfn\s+)\w+/,lookbehind:!0,alias:"function"},"type-definition":{pattern:/(\b(?:enum|struct|trait|type|union)\s+)\w+/,lookbehind:!0,alias:"class-name"},"module-declaration":[{pattern:/(\b(?:crate|mod)\s+)[a-z][a-z_\d]*/,lookbehind:!0,alias:"namespace"},{pattern:/(\b(?:crate|self|super)\s*)::\s*[a-z][a-z_\d]*\b(?:\s*::(?:\s*[a-z][a-z_\d]*\s*::)*)?/,lookbehind:!0,alias:"namespace",inside:{punctuation:/::/}}],keyword:[/\b(?:Self|abstract|as|async|await|become|box|break|const|continue|crate|do|dyn|else|enum|extern|final|fn|for|if|impl|in|let|loop|macro|match|mod|move|mut|override|priv|pub|ref|return|self|static|struct|super|trait|try|type|typeof|union|unsafe|unsized|use|virtual|where|while|yield)\b/,/\b(?:bool|char|f(?:32|64)|[ui](?:8|16|32|64|128|size)|str)\b/],function:/\b[a-z_]\w*(?=\s*(?:::\s*<|\())/,macro:{pattern:/\b\w+!/,alias:"property"},constant:/\b[A-Z_][A-Z_\d]+\b/,"class-name":/\b[A-Z]\w*\b/,namespace:{pattern:/(?:\b[a-z][a-z_\d]*\s*::\s*)*\b[a-z][a-z_\d]*\s*::(?!\s*<)/,inside:{punctuation:/::/}},number:/\b(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0o[0-7](?:_?[0-7])*|0b[01](?:_?[01])*|(?:(?:\d(?:_?\d)*)?\.)?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)(?:_?(?:f32|f64|[iu](?:8|16|32|64|size)?))?\b/,boolean:/\b(?:false|true)\b/,punctuation:/->|\.\.=|\.{1,3}|::|[{}[\];(),:]/,operator:/[-+*\/%!^]=?|=[=>]?|&[&=]?|\|[|=]?|<<?=?|>>?=?|[@?]/},e.languages.rust["closure-params"].inside.rest=e.languages.rust,e.languages.rust.attribute.inside.string=e.languages.rust.string})(Prism);(function(e){var t=/\b(?:abstract|assert|boolean|break|byte|case|catch|char|class|const|continue|default|do|double|else|enum|exports|extends|final|finally|float|for|goto|if|implements|import|instanceof|int|interface|long|module|native|new|non-sealed|null|open|opens|package|permits|private|protected|provides|public|record(?!\s*[(){}[\]<>=%~.:,;?+\-*/&|^])|requires|return|sealed|short|static|strictfp|super|switch|synchronized|this|throw|throws|to|transient|transitive|try|uses|var|void|volatile|while|with|yield)\b/,n=/(?:[a-z]\w*\s*\.\s*)*(?:[A-Z]\w*\s*\.\s*)*/.source,r={pattern:RegExp(/(^|[^\w.])/.source+n+/[A-Z](?:[\d_A-Z]*[a-z]\w*)?\b/.source),lookbehind:!0,inside:{namespace:{pattern:/^[a-z]\w*(?:\s*\.\s*[a-z]\w*)*(?:\s*\.)?/,inside:{punctuation:/\./}},punctuation:/\./}};e.languages.java=e.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"/,lookbehind:!0,greedy:!0},"class-name":[r,{pattern:RegExp(/(^|[^\w.])/.source+n+/[A-Z]\w*(?=\s+\w+\s*[;,=()]|\s*(?:\[[\s,]*\]\s*)?::\s*new\b)/.source),lookbehind:!0,inside:r.inside},{pattern:RegExp(/(\b(?:class|enum|extends|implements|instanceof|interface|new|record|throws)\s+)/.source+n+/[A-Z]\w*\b/.source),lookbehind:!0,inside:r.inside}],keyword:t,function:[e.languages.clike.function,{pattern:/(::\s*)[a-z_]\w*/,lookbehind:!0}],number:/\b0b[01][01_]*L?\b|\b0x(?:\.[\da-f_p+-]+|[\da-f_]+(?:\.[\da-f_p+-]+)?)\b|(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?\d[\d_]*)?[dfl]?/i,operator:{pattern:/(^|[^.])(?:<<=?|>>>?=?|->|--|\+\+|&&|\|\||::|[?:~]|[-+*/%&|^!=<>]=?)/m,lookbehind:!0},constant:/\b[A-Z][A-Z_\d]+\b/}),e.languages.insertBefore("java","string",{"triple-quoted-string":{pattern:/"""[ \t]*[\r\n](?:(?:"|"")?(?:\\.|[^"\\]))*"""/,greedy:!0,alias:"string"},char:{pattern:/'(?:\\.|[^'\\\r\n]){1,6}'/,greedy:!0}}),e.languages.insertBefore("java","class-name",{annotation:{pattern:/(^|[^.])@\w+(?:\s*\.\s*\w+)*/,lookbehind:!0,alias:"punctuation"},generics:{pattern:/<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&))*>)*>)*>)*>/,inside:{"class-name":r,keyword:t,punctuation:/[<>(),.:]/,operator:/[?&|]/}},import:[{pattern:RegExp(/(\bimport\s+)/.source+n+/(?:[A-Z]\w*|\*)(?=\s*;)/.source),lookbehind:!0,inside:{namespace:r.inside.namespace,punctuation:/\./,operator:/\*/,"class-name":/\w+/}},{pattern:RegExp(/(\bimport\s+static\s+)/.source+n+/(?:\w+|\*)(?=\s*;)/.source),lookbehind:!0,alias:"static",inside:{namespace:r.inside.namespace,static:/\b\w+$/,punctuation:/\./,operator:/\*/,"class-name":/\w+/}}],namespace:{pattern:RegExp(/(\b(?:exports|import(?:\s+static)?|module|open|opens|package|provides|requires|to|transitive|uses|with)\s+)(?!<keyword>)[a-z]\w*(?:\.[a-z]\w*)*\.?/.source.replace(/<keyword>/g,function(){return t.source})),lookbehind:!0,inside:{punctuation:/\./}}})})(Prism);(function(e){e.languages.kotlin=e.languages.extend("clike",{keyword:{pattern:/(^|[^.])\b(?:abstract|actual|annotation|as|break|by|catch|class|companion|const|constructor|continue|crossinline|data|do|dynamic|else|enum|expect|external|final|finally|for|fun|get|if|import|in|infix|init|inline|inner|interface|internal|is|lateinit|noinline|null|object|open|operator|out|override|package|private|protected|public|reified|return|sealed|set|super|suspend|tailrec|this|throw|to|try|typealias|val|var|vararg|when|where|while)\b/,lookbehind:!0},function:[{pattern:/(?:`[^\r\n`]+`|\b\w+)(?=\s*\()/,greedy:!0},{pattern:/(\.)(?:`[^\r\n`]+`|\w+)(?=\s*\{)/,lookbehind:!0,greedy:!0}],number:/\b(?:0[xX][\da-fA-F]+(?:_[\da-fA-F]+)*|0[bB][01]+(?:_[01]+)*|\d+(?:_\d+)*(?:\.\d+(?:_\d+)*)?(?:[eE][+-]?\d+(?:_\d+)*)?[fFL]?)\b/,operator:/\+[+=]?|-[-=>]?|==?=?|!(?:!|==?)?|[\/*%<>]=?|[?:]:?|\.\.|&&|\|\||\b(?:and|inv|or|shl|shr|ushr|xor)\b/}),delete e.languages.kotlin["class-name"];var t={"interpolation-punctuation":{pattern:/^\$\{?|\}$/,alias:"punctuation"},expression:{pattern:/[\s\S]+/,inside:e.languages.kotlin}};e.languages.insertBefore("kotlin","string",{"string-literal":[{pattern:/"""(?:[^$]|\$(?:(?!\{)|\{[^{}]*\}))*?"""/,alias:"multiline",inside:{interpolation:{pattern:/\$(?:[a-z_]\w*|\{[^{}]*\})/i,inside:t},string:/[\s\S]+/}},{pattern:/"(?:[^"\\\r\n$]|\\.|\$(?:(?!\{)|\{[^{}]*\}))*"/,alias:"singleline",inside:{interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$(?:[a-z_]\w*|\{[^{}]*\})/i,lookbehind:!0,inside:t},string:/[\s\S]+/}}],char:{pattern:/'(?:[^'\\\r\n]|\\(?:.|u[a-fA-F0-9]{0,4}))'/,greedy:!0}}),delete e.languages.kotlin.string,e.languages.insertBefore("kotlin","keyword",{annotation:{pattern:/\B@(?:\w+:)?(?:[A-Z]\w*|\[[^\]]+\])/,alias:"builtin"}}),e.languages.insertBefore("kotlin","function",{label:{pattern:/\b\w+@|@\w+\b/,alias:"symbol"}}),e.languages.kt=e.languages.kotlin,e.languages.kts=e.languages.kotlin})(Prism);Prism.languages.swift={comment:{pattern:/(^|[^\\:])(?:\/\/.*|\/\*(?:[^/*]|\/(?!\*)|\*(?!\/)|\/\*(?:[^*]|\*(?!\/))*\*\/)*\*\/)/,lookbehind:!0,greedy:!0},"string-literal":[{pattern:RegExp(/(^|[^"#])/.source+"(?:"+/"(?:\\(?:\((?:[^()]|\([^()]*\))*\)|\r\n|[^(])|[^\\\r\n"])*"/.source+"|"+/"""(?:\\(?:\((?:[^()]|\([^()]*\))*\)|[^(])|[^\\"]|"(?!""))*"""/.source+")"+/(?!["#])/.source),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\\($/,alias:"punctuation"},punctuation:/\\(?=[\r\n])/,string:/[\s\S]+/}},{pattern:RegExp(/(^|[^"#])(#+)/.source+"(?:"+/"(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|\r\n|[^#])|[^\\\r\n])*?"/.source+"|"+/"""(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|[^#])|[^\\])*?"""/.source+")\\2"),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\#+\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\#+\($/,alias:"punctuation"},string:/[\s\S]+/}}],directive:{pattern:RegExp(/#/.source+"(?:"+(/(?:elseif|if)\b/.source+"(?:[ ]*"+/(?:![ \t]*)?(?:\b\w+\b(?:[ \t]*\((?:[^()]|\([^()]*\))*\))?|\((?:[^()]|\([^()]*\))*\))(?:[ \t]*(?:&&|\|\|))?/.source+")+")+"|"+/(?:else|endif)\b/.source+")"),alias:"property",inside:{"directive-name":/^#\w+/,boolean:/\b(?:false|true)\b/,number:/\b\d+(?:\.\d+)*\b/,operator:/!|&&|\|\||[<>]=?/,punctuation:/[(),]/}},literal:{pattern:/#(?:colorLiteral|column|dsohandle|file(?:ID|Literal|Path)?|function|imageLiteral|line)\b/,alias:"constant"},"other-directive":{pattern:/#\w+\b/,alias:"property"},attribute:{pattern:/@\w+/,alias:"atrule"},"function-definition":{pattern:/(\bfunc\s+)\w+/,lookbehind:!0,alias:"function"},label:{pattern:/\b(break|continue)\s+\w+|\b[a-zA-Z_]\w*(?=\s*:\s*(?:for|repeat|while)\b)/,lookbehind:!0,alias:"important"},keyword:/\b(?:Any|Protocol|Self|Type|actor|as|assignment|associatedtype|associativity|async|await|break|case|catch|class|continue|convenience|default|defer|deinit|didSet|do|dynamic|else|enum|extension|fallthrough|fileprivate|final|for|func|get|guard|higherThan|if|import|in|indirect|infix|init|inout|internal|is|isolated|lazy|left|let|lowerThan|mutating|none|nonisolated|nonmutating|open|operator|optional|override|postfix|precedencegroup|prefix|private|protocol|public|repeat|required|rethrows|return|right|safe|self|set|some|static|struct|subscript|super|switch|throw|throws|try|typealias|unowned|unsafe|var|weak|where|while|willSet)\b/,boolean:/\b(?:false|true)\b/,nil:{pattern:/\bnil\b/,alias:"constant"},"short-argument":/\$\d+\b/,omit:{pattern:/\b_\b/,alias:"keyword"},number:/\b(?:[\d_]+(?:\.[\de_]+)?|0x[a-f0-9_]+(?:\.[a-f0-9p_]+)?|0b[01_]+|0o[0-7_]+)\b/i,"class-name":/\b[A-Z](?:[A-Z_\d]*[a-z]\w*)?\b/,function:/\b[a-z_]\w*(?=\s*\()/i,constant:/\b(?:[A-Z_]{2,}|k[A-Z][A-Za-z_]+)\b/,operator:/[-+*/%=!<>&|^~?]+|\.[.\-+*/%=!<>&|^~?]+/,punctuation:/[{}[\]();,.:\\]/};Prism.languages.swift["string-literal"].forEach(function(e){e.inside.interpolation.inside=Prism.languages.swift});Prism.languages.c=Prism.languages.extend("clike",{comment:{pattern:/\/\/(?:[^\r\n\\]|\\(?:\r\n?|\n|(?![\r\n])))*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},"class-name":{pattern:/(\b(?:enum|struct)\s+(?:__attribute__\s*\(\([\s\S]*?\)\)\s*)?)\w+|\b[a-z]\w*_t\b/,lookbehind:!0},keyword:/\b(?:_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|__attribute__|asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|inline|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|typeof|union|unsigned|void|volatile|while)\b/,function:/\b[a-z_]\w*(?=\s*\()/i,number:/(?:\b0x(?:[\da-f]+(?:\.[\da-f]*)?|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[ful]{0,4}/i,operator:/>>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/});Prism.languages.insertBefore("c","string",{char:{pattern:/'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n]){0,32}'/,greedy:!0}});Prism.languages.insertBefore("c","string",{macro:{pattern:/(^[\t ]*)#\s*[a-z](?:[^\r\n\\/]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|\\(?:\r\n|[\s\S]))*/im,lookbehind:!0,greedy:!0,alias:"property",inside:{string:[{pattern:/^(#\s*include\s*)<[^>]+>/,lookbehind:!0},Prism.languages.c.string],char:Prism.languages.c.char,comment:Prism.languages.c.comment,"macro-name":[{pattern:/(^#\s*define\s+)\w+\b(?!\()/i,lookbehind:!0},{pattern:/(^#\s*define\s+)\w+\b(?=\()/i,lookbehind:!0,alias:"function"}],directive:{pattern:/^(#\s*)[a-z]+/,lookbehind:!0,alias:"keyword"},"directive-hash":/^#/,punctuation:/##|\\(?=[\r\n])/,expression:{pattern:/\S[\s\S]*/,inside:Prism.languages.c}}}});Prism.languages.insertBefore("c","function",{constant:/\b(?:EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|__DATE__|__FILE__|__LINE__|__TIMESTAMP__|__TIME__|__func__|stderr|stdin|stdout)\b/});delete Prism.languages.c.boolean;(function(e){var t=/\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|char8_t|class|co_await|co_return|co_yield|compl|concept|const|const_cast|consteval|constexpr|constinit|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|final|float|for|friend|goto|if|import|inline|int|int16_t|int32_t|int64_t|int8_t|long|module|mutable|namespace|new|noexcept|nullptr|operator|override|private|protected|public|register|reinterpret_cast|requires|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|uint16_t|uint32_t|uint64_t|uint8_t|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/,n=/\b(?!<keyword>)\w+(?:\s*\.\s*\w+)*\b/.source.replace(/<keyword>/g,function(){return t.source});e.languages.cpp=e.languages.extend("c",{"class-name":[{pattern:RegExp(/(\b(?:class|concept|enum|struct|typename)\s+)(?!<keyword>)\w+/.source.replace(/<keyword>/g,function(){return t.source})),lookbehind:!0},/\b[A-Z]\w*(?=\s*::\s*\w+\s*\()/,/\b[A-Z_]\w*(?=\s*::\s*~\w+\s*\()/i,/\b\w+(?=\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>\s*::\s*\w+\s*\()/],keyword:t,number:{pattern:/(?:\b0b[01']+|\b0x(?:[\da-f']+(?:\.[\da-f']*)?|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+(?:\.[\d']*)?|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]{0,4}/i,greedy:!0},operator:/>>=?|<<=?|->|--|\+\+|&&|\|\||[?:~]|<=>|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/,boolean:/\b(?:false|true)\b/}),e.languages.insertBefore("cpp","string",{module:{pattern:RegExp(/(\b(?:import|module)\s+)/.source+"(?:"+/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|<[^<>\r\n]*>/.source+"|"+/<mod-name>(?:\s*:\s*<mod-name>)?|:\s*<mod-name>/.source.replace(/<mod-name>/g,function(){return n})+")"),lookbehind:!0,greedy:!0,inside:{string:/^[<"][\s\S]+/,operator:/:/,punctuation:/\./}},"raw-string":{pattern:/R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,alias:"string",greedy:!0}}),e.languages.insertBefore("cpp","keyword",{"generic-function":{pattern:/\b(?!operator\b)[a-z_]\w*\s*<(?:[^<>]|<[^<>]*>)*>(?=\s*\()/i,inside:{function:/^\w+/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:e.languages.cpp}}}}),e.languages.insertBefore("cpp","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}}),e.languages.insertBefore("cpp","class-name",{"base-clause":{pattern:/(\b(?:class|struct)\s+\w+\s*:\s*)[^;{}"'\s]+(?:\s+[^;{}"'\s]+)*(?=\s*[;{])/,lookbehind:!0,greedy:!0,inside:e.languages.extend("cpp",{})}}),e.languages.insertBefore("inside","double-colon",{"class-name":/\b[a-z_]\w*\b(?!\s*::)/i},e.languages.cpp["base-clause"])})(Prism);(function(e){function t(K,S){return K.replace(/<<(\d+)>>/g,function(X,Z){return"(?:"+S[+Z]+")"})}function n(K,S,X){return RegExp(t(K,S),"")}function r(K,S){for(var X=0;X<S;X++)K=K.replace(/<<self>>/g,function(){return"(?:"+K+")"});return K.replace(/<<self>>/g,"[^\\s\\S]")}var i={type:"bool byte char decimal double dynamic float int long object sbyte short string uint ulong ushort var void",typeDeclaration:"class enum interface record struct",contextual:"add alias and ascending async await by descending from(?=\\s*(?:\\w|$)) get global group into init(?=\\s*;) join let nameof not notnull on or orderby partial remove select set unmanaged value when where with(?=\\s*{)",other:"abstract as base break case catch checked const continue default delegate do else event explicit extern finally fixed for foreach goto if implicit in internal is lock namespace new null operator out override params private protected public readonly ref return sealed sizeof stackalloc static switch this throw try typeof unchecked unsafe using virtual volatile while yield"};function o(K){return"\\b(?:"+K.trim().replace(/ /g,"|")+")\\b"}var s=o(i.typeDeclaration),l=RegExp(o(i.type+" "+i.typeDeclaration+" "+i.contextual+" "+i.other)),a=o(i.typeDeclaration+" "+i.contextual+" "+i.other),u=o(i.type+" "+i.typeDeclaration+" "+i.other),c=r(/<(?:[^<>;=+\-*/%&|^]|<<self>>)*>/.source,2),d=r(/\((?:[^()]|<<self>>)*\)/.source,2),h=/@?\b[A-Za-z_]\w*\b/.source,p=t(/<<0>>(?:\s*<<1>>)?/.source,[h,c]),y=t(/(?!<<0>>)<<1>>(?:\s*\.\s*<<1>>)*/.source,[a,p]),v=/\[\s*(?:,\s*)*\]/.source,w=t(/<<0>>(?:\s*(?:\?\s*)?<<1>>)*(?:\s*\?)?/.source,[y,v]),x=t(/[^,()<>[\];=+\-*/%&|^]|<<0>>|<<1>>|<<2>>/.source,[c,d,v]),m=t(/\(<<0>>+(?:,<<0>>+)+\)/.source,[x]),g=t(/(?:<<0>>|<<1>>)(?:\s*(?:\?\s*)?<<2>>)*(?:\s*\?)?/.source,[m,y,v]),k={keyword:l,punctuation:/[<>()?,.:[\]]/},C=/'(?:[^\r\n'\\]|\\.|\\[Uux][\da-fA-F]{1,8})'/.source,E=/"(?:\\.|[^\\"\r\n])*"/.source,A=/@"(?:""|\\[\s\S]|[^\\"])*"(?!")/.source;e.languages.csharp=e.languages.extend("clike",{string:[{pattern:n(/(^|[^$\\])<<0>>/.source,[A]),lookbehind:!0,greedy:!0},{pattern:n(/(^|[^@$\\])<<0>>/.source,[E]),lookbehind:!0,greedy:!0}],"class-name":[{pattern:n(/(\busing\s+static\s+)<<0>>(?=\s*;)/.source,[y]),lookbehind:!0,inside:k},{pattern:n(/(\busing\s+<<0>>\s*=\s*)<<1>>(?=\s*;)/.source,[h,g]),lookbehind:!0,inside:k},{pattern:n(/(\busing\s+)<<0>>(?=\s*=)/.source,[h]),lookbehind:!0},{pattern:n(/(\b<<0>>\s+)<<1>>/.source,[s,p]),lookbehind:!0,inside:k},{pattern:n(/(\bcatch\s*\(\s*)<<0>>/.source,[y]),lookbehind:!0,inside:k},{pattern:n(/(\bwhere\s+)<<0>>/.source,[h]),lookbehind:!0},{pattern:n(/(\b(?:is(?:\s+not)?|as)\s+)<<0>>/.source,[w]),lookbehind:!0,inside:k},{pattern:n(/\b<<0>>(?=\s+(?!<<1>>|with\s*\{)<<2>>(?:\s*[=,;:{)\]]|\s+(?:in|when)\b))/.source,[g,u,h]),inside:k}],keyword:l,number:/(?:\b0(?:x[\da-f_]*[\da-f]|b[01_]*[01])|(?:\B\.\d+(?:_+\d+)*|\b\d+(?:_+\d+)*(?:\.\d+(?:_+\d+)*)?)(?:e[-+]?\d+(?:_+\d+)*)?)(?:[dflmu]|lu|ul)?\b/i,operator:/>>=?|<<=?|[-=]>|([-+&|])\1|~|\?\?=?|[-+*/%&|^!=<>]=?/,punctuation:/\?\.?|::|[{}[\];(),.:]/}),e.languages.insertBefore("csharp","number",{range:{pattern:/\.\./,alias:"operator"}}),e.languages.insertBefore("csharp","punctuation",{"named-parameter":{pattern:n(/([(,]\s*)<<0>>(?=\s*:)/.source,[h]),lookbehind:!0,alias:"punctuation"}}),e.languages.insertBefore("csharp","class-name",{namespace:{pattern:n(/(\b(?:namespace|using)\s+)<<0>>(?:\s*\.\s*<<0>>)*(?=\s*[;{])/.source,[h]),lookbehind:!0,inside:{punctuation:/\./}},"type-expression":{pattern:n(/(\b(?:default|sizeof|typeof)\s*\(\s*(?!\s))(?:[^()\s]|\s(?!\s)|<<0>>)*(?=\s*\))/.source,[d]),lookbehind:!0,alias:"class-name",inside:k},"return-type":{pattern:n(/<<0>>(?=\s+(?:<<1>>\s*(?:=>|[({]|\.\s*this\s*\[)|this\s*\[))/.source,[g,y]),inside:k,alias:"class-name"},"constructor-invocation":{pattern:n(/(\bnew\s+)<<0>>(?=\s*[[({])/.source,[g]),lookbehind:!0,inside:k,alias:"class-name"},"generic-method":{pattern:n(/<<0>>\s*<<1>>(?=\s*\()/.source,[h,c]),inside:{function:n(/^<<0>>/.source,[h]),generic:{pattern:RegExp(c),alias:"class-name",inside:k}}},"type-list":{pattern:n(/\b((?:<<0>>\s+<<1>>|record\s+<<1>>\s*<<5>>|where\s+<<2>>)\s*:\s*)(?:<<3>>|<<4>>|<<1>>\s*<<5>>|<<6>>)(?:\s*,\s*(?:<<3>>|<<4>>|<<6>>))*(?=\s*(?:where|[{;]|=>|$))/.source,[s,p,h,g,l.source,d,/\bnew\s*\(\s*\)/.source]),lookbehind:!0,inside:{"record-arguments":{pattern:n(/(^(?!new\s*\()<<0>>\s*)<<1>>/.source,[p,d]),lookbehind:!0,greedy:!0,inside:e.languages.csharp},keyword:l,"class-name":{pattern:RegExp(g),greedy:!0,inside:k},punctuation:/[,()]/}},preprocessor:{pattern:/(^[\t ]*)#.*/m,lookbehind:!0,alias:"property",inside:{directive:{pattern:/(#)\b(?:define|elif|else|endif|endregion|error|if|line|nullable|pragma|region|undef|warning)\b/,lookbehind:!0,alias:"keyword"}}}});var T=E+"|"+C,L=t(/\/(?![*/])|\/\/[^\r\n]*[\r\n]|\/\*(?:[^*]|\*(?!\/))*\*\/|<<0>>/.source,[T]),b=r(t(/[^"'/()]|<<0>>|\(<<self>>*\)/.source,[L]),2),R=/\b(?:assembly|event|field|method|module|param|property|return|type)\b/.source,$=t(/<<0>>(?:\s*\(<<1>>*\))?/.source,[y,b]);e.languages.insertBefore("csharp","class-name",{attribute:{pattern:n(/((?:^|[^\s\w>)?])\s*\[\s*)(?:<<0>>\s*:\s*)?<<1>>(?:\s*,\s*<<1>>)*(?=\s*\])/.source,[R,$]),lookbehind:!0,greedy:!0,inside:{target:{pattern:n(/^<<0>>(?=\s*:)/.source,[R]),alias:"keyword"},"attribute-arguments":{pattern:n(/\(<<0>>*\)/.source,[b]),inside:e.languages.csharp},"class-name":{pattern:RegExp(y),inside:{punctuation:/\./}},punctuation:/[:,]/}}});var P=/:[^}\r\n]+/.source,I=r(t(/[^"'/()]|<<0>>|\(<<self>>*\)/.source,[L]),2),z=t(/\{(?!\{)(?:(?![}:])<<0>>)*<<1>>?\}/.source,[I,P]),B=r(t(/[^"'/()]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|<<0>>|\(<<self>>*\)/.source,[T]),2),W=t(/\{(?!\{)(?:(?![}:])<<0>>)*<<1>>?\}/.source,[B,P]);function M(K,S){return{interpolation:{pattern:n(/((?:^|[^{])(?:\{\{)*)<<0>>/.source,[K]),lookbehind:!0,inside:{"format-string":{pattern:n(/(^\{(?:(?![}:])<<0>>)*)<<1>>(?=\}$)/.source,[S,P]),lookbehind:!0,inside:{punctuation:/^:/}},punctuation:/^\{|\}$/,expression:{pattern:/[\s\S]+/,alias:"language-csharp",inside:e.languages.csharp}}},string:/[\s\S]+/}}e.languages.insertBefore("csharp","string",{"interpolation-string":[{pattern:n(/(^|[^\\])(?:\$@|@\$)"(?:""|\\[\s\S]|\{\{|<<0>>|[^\\{"])*"/.source,[z]),lookbehind:!0,greedy:!0,inside:M(z,I)},{pattern:n(/(^|[^@\\])\$"(?:\\.|\{\{|<<0>>|[^\\"{])*"/.source,[W]),lookbehind:!0,greedy:!0,inside:M(W,B)}],char:{pattern:RegExp(C),greedy:!0}}),e.languages.dotnet=e.languages.cs=e.languages.csharp})(Prism);(function(e){e.languages.ruby=e.languages.extend("clike",{comment:{pattern:/#.*|^=begin\s[\s\S]*?^=end/m,greedy:!0},"class-name":{pattern:/(\b(?:class|module)\s+|\bcatch\s+\()[\w.\\]+|\b[A-Z_]\w*(?=\s*\.\s*new\b)/,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:BEGIN|END|alias|and|begin|break|case|class|def|define_method|defined|do|each|else|elsif|end|ensure|extend|for|if|in|include|module|new|next|nil|not|or|prepend|private|protected|public|raise|redo|require|rescue|retry|return|self|super|then|throw|undef|unless|until|when|while|yield)\b/,operator:/\.{2,3}|&\.|===|<?=>|[!=]?~|(?:&&|\|\||<<|>>|\*\*|[+\-*/%<>!^&|=])=?|[?:]/,punctuation:/[(){}[\].,;]/}),e.languages.insertBefore("ruby","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}});var t={pattern:/((?:^|[^\\])(?:\\{2})*)#\{(?:[^{}]|\{[^{}]*\})*\}/,lookbehind:!0,inside:{content:{pattern:/^(#\{)[\s\S]+(?=\}$)/,lookbehind:!0,inside:e.languages.ruby},delimiter:{pattern:/^#\{|\}$/,alias:"punctuation"}}};delete e.languages.ruby.function;var n="(?:"+[/([^a-zA-Z0-9\s{(\[<=])(?:(?!\1)[^\\]|\\[\s\S])*\1/.source,/\((?:[^()\\]|\\[\s\S]|\((?:[^()\\]|\\[\s\S])*\))*\)/.source,/\{(?:[^{}\\]|\\[\s\S]|\{(?:[^{}\\]|\\[\s\S])*\})*\}/.source,/\[(?:[^\[\]\\]|\\[\s\S]|\[(?:[^\[\]\\]|\\[\s\S])*\])*\]/.source,/<(?:[^<>\\]|\\[\s\S]|<(?:[^<>\\]|\\[\s\S])*>)*>/.source].join("|")+")",r=/(?:"(?:\\.|[^"\\\r\n])*"|(?:\b[a-zA-Z_]\w*|[^\s\0-\x7F]+)[?!]?|\$.)/.source;e.languages.insertBefore("ruby","keyword",{"regex-literal":[{pattern:RegExp(/%r/.source+n+/[egimnosux]{0,6}/.source),greedy:!0,inside:{interpolation:t,regex:/[\s\S]+/}},{pattern:/(^|[^/])\/(?!\/)(?:\[[^\r\n\]]+\]|\\.|[^[/\\\r\n])+\/[egimnosux]{0,6}(?=\s*(?:$|[\r\n,.;})#]))/,lookbehind:!0,greedy:!0,inside:{interpolation:t,regex:/[\s\S]+/}}],variable:/[@$]+[a-zA-Z_]\w*(?:[?!]|\b)/,symbol:[{pattern:RegExp(/(^|[^:]):/.source+r),lookbehind:!0,greedy:!0},{pattern:RegExp(/([\r\n{(,][ \t]*)/.source+r+/(?=:(?!:))/.source),lookbehind:!0,greedy:!0}],"method-definition":{pattern:/(\bdef\s+)\w+(?:\s*\.\s*\w+)?/,lookbehind:!0,inside:{function:/\b\w+$/,keyword:/^self\b/,"class-name":/^\w+/,punctuation:/\./}}}),e.languages.insertBefore("ruby","string",{"string-literal":[{pattern:RegExp(/%[qQiIwWs]?/.source+n),greedy:!0,inside:{interpolation:t,string:/[\s\S]+/}},{pattern:/("|')(?:#\{[^}]+\}|#(?!\{)|\\(?:\r\n|[\s\S])|(?!\1)[^\\#\r\n])*\1/,greedy:!0,inside:{interpolation:t,string:/[\s\S]+/}},{pattern:/<<[-~]?([a-z_]\w*)[\r\n](?:.*[\r\n])*?[\t ]*\1/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<[-~]?[a-z_]\w*|\b[a-z_]\w*$/i,inside:{symbol:/\b\w+/,punctuation:/^<<[-~]?/}},interpolation:t,string:/[\s\S]+/}},{pattern:/<<[-~]?'([a-z_]\w*)'[\r\n](?:.*[\r\n])*?[\t ]*\1/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<[-~]?'[a-z_]\w*'|\b[a-z_]\w*$/i,inside:{symbol:/\b\w+/,punctuation:/^<<[-~]?'|'$/}},string:/[\s\S]+/}}],"command-literal":[{pattern:RegExp(/%x/.source+n),greedy:!0,inside:{interpolation:t,command:{pattern:/[\s\S]+/,alias:"string"}}},{pattern:/`(?:#\{[^}]+\}|#(?!\{)|\\(?:\r\n|[\s\S])|[^\\`#\r\n])*`/,greedy:!0,inside:{interpolation:t,command:{pattern:/[\s\S]+/,alias:"string"}}}]}),delete e.languages.ruby.string,e.languages.insertBefore("ruby","number",{builtin:/\b(?:Array|Bignum|Binding|Class|Continuation|Dir|Exception|FalseClass|File|Fixnum|Float|Hash|IO|Integer|MatchData|Method|Module|NilClass|Numeric|Object|Proc|Range|Regexp|Stat|String|Struct|Symbol|TMS|Thread|ThreadGroup|Time|TrueClass)\b/,constant:/\b[A-Z][A-Z0-9_]*(?:[?!]|\b)/}),e.languages.rb=e.languages.ruby})(Prism);(function(e){function t(n,r){return"___"+n.toUpperCase()+r+"___"}Object.defineProperties(e.languages["markup-templating"]={},{buildPlaceholders:{value:function(n,r,i,o){if(n.language===r){var s=n.tokenStack=[];n.code=n.code.replace(i,function(l){if(typeof o=="function"&&!o(l))return l;for(var a=s.length,u;n.code.indexOf(u=t(r,a))!==-1;)++a;return s[a]=l,u}),n.grammar=e.languages.markup}}},tokenizePlaceholders:{value:function(n,r){if(n.language!==r||!n.tokenStack)return;n.grammar=e.languages[r];var i=0,o=Object.keys(n.tokenStack);function s(l){for(var a=0;a<l.length&&!(i>=o.length);a++){var u=l[a];if(typeof u=="string"||u.content&&typeof u.content=="string"){var c=o[i],d=n.tokenStack[c],h=typeof u=="string"?u:u.content,p=t(r,c),y=h.indexOf(p);if(y>-1){++i;var v=h.substring(0,y),w=new e.Token(r,e.tokenize(d,n.grammar),"language-"+r,d),x=h.substring(y+p.length),m=[];v&&m.push.apply(m,s([v])),m.push(w),x&&m.push.apply(m,s([x])),typeof u=="string"?l.splice.apply(l,[a,1].concat(m)):u.content=m}}else u.content&&s(u.content)}return l}s(n.tokens)}}})})(Prism);(function(e){var t=/\/\*[\s\S]*?\*\/|\/\/.*|#(?!\[).*/,n=[{pattern:/\b(?:false|true)\b/i,alias:"boolean"},{pattern:/(::\s*)\b[a-z_]\w*\b(?!\s*\()/i,greedy:!0,lookbehind:!0},{pattern:/(\b(?:case|const)\s+)\b[a-z_]\w*(?=\s*[;=])/i,greedy:!0,lookbehind:!0},/\b(?:null)\b/i,/\b[A-Z_][A-Z0-9_]*\b(?!\s*\()/],r=/\b0b[01]+(?:_[01]+)*\b|\b0o[0-7]+(?:_[0-7]+)*\b|\b0x[\da-f]+(?:_[\da-f]+)*\b|(?:\b\d+(?:_\d+)*\.?(?:\d+(?:_\d+)*)?|\B\.\d+)(?:e[+-]?\d+)?/i,i=/<?=>|\?\?=?|\.{3}|\??->|[!=]=?=?|::|\*\*=?|--|\+\+|&&|\|\||<<|>>|[?~]|[/^|%*&<>.+-]=?/,o=/[{}\[\](),:;]/;e.languages.php={delimiter:{pattern:/\?>$|^<\?(?:php(?=\s)|=)?/i,alias:"important"},comment:t,variable:/\$+(?:\w+\b|(?=\{))/,package:{pattern:/(namespace\s+|use\s+(?:function\s+)?)(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,lookbehind:!0,inside:{punctuation:/\\/}},"class-name-definition":{pattern:/(\b(?:class|enum|interface|trait)\s+)\b[a-z_]\w*(?!\\)\b/i,lookbehind:!0,alias:"class-name"},"function-definition":{pattern:/(\bfunction\s+)[a-z_]\w*(?=\s*\()/i,lookbehind:!0,alias:"function"},keyword:[{pattern:/(\(\s*)\b(?:array|bool|boolean|float|int|integer|object|string)\b(?=\s*\))/i,alias:"type-casting",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*)\b(?:array(?!\s*\()|bool|callable|(?:false|null)(?=\s*\|)|float|int|iterable|mixed|object|self|static|string)\b(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*(?:\?\s*)?)\b(?:array(?!\s*\()|bool|callable|(?:false|null)(?=\s*\|)|float|int|iterable|mixed|never|object|self|static|string|void)\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/\b(?:array(?!\s*\()|bool|float|int|iterable|mixed|object|string|void)\b/i,alias:"type-declaration",greedy:!0},{pattern:/(\|\s*)(?:false|null)\b|\b(?:false|null)(?=\s*\|)/i,alias:"type-declaration",greedy:!0,lookbehind:!0},{pattern:/\b(?:parent|self|static)(?=\s*::)/i,alias:"static-context",greedy:!0},{pattern:/(\byield\s+)from\b/i,lookbehind:!0},/\bclass\b/i,{pattern:/((?:^|[^\s>:]|(?:^|[^-])>|(?:^|[^:]):)\s*)\b(?:abstract|and|array|as|break|callable|case|catch|clone|const|continue|declare|default|die|do|echo|else|elseif|empty|enddeclare|endfor|endforeach|endif|endswitch|endwhile|enum|eval|exit|extends|final|finally|fn|for|foreach|function|global|goto|if|implements|include|include_once|instanceof|insteadof|interface|isset|list|match|namespace|never|new|or|parent|print|private|protected|public|readonly|require|require_once|return|self|static|switch|throw|trait|try|unset|use|var|while|xor|yield|__halt_compiler)\b/i,lookbehind:!0}],"argument-name":{pattern:/([(,]\s*)\b[a-z_]\w*(?=\s*:(?!:))/i,lookbehind:!0},"class-name":[{pattern:/(\b(?:extends|implements|instanceof|new(?!\s+self|\s+static))\s+|\bcatch\s*\()\b[a-z_]\w*(?!\\)\b/i,greedy:!0,lookbehind:!0},{pattern:/(\|\s*)\b[a-z_]\w*(?!\\)\b/i,greedy:!0,lookbehind:!0},{pattern:/\b[a-z_]\w*(?!\\)\b(?=\s*\|)/i,greedy:!0},{pattern:/(\|\s*)(?:\\?\b[a-z_]\w*)+\b/i,alias:"class-name-fully-qualified",greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/(?:\\?\b[a-z_]\w*)+\b(?=\s*\|)/i,alias:"class-name-fully-qualified",greedy:!0,inside:{punctuation:/\\/}},{pattern:/(\b(?:extends|implements|instanceof|new(?!\s+self\b|\s+static\b))\s+|\bcatch\s*\()(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,alias:"class-name-fully-qualified",greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/\b[a-z_]\w*(?=\s*\$)/i,alias:"type-declaration",greedy:!0},{pattern:/(?:\\?\b[a-z_]\w*)+(?=\s*\$)/i,alias:["class-name-fully-qualified","type-declaration"],greedy:!0,inside:{punctuation:/\\/}},{pattern:/\b[a-z_]\w*(?=\s*::)/i,alias:"static-context",greedy:!0},{pattern:/(?:\\?\b[a-z_]\w*)+(?=\s*::)/i,alias:["class-name-fully-qualified","static-context"],greedy:!0,inside:{punctuation:/\\/}},{pattern:/([(,?]\s*)[a-z_]\w*(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*)(?:\\?\b[a-z_]\w*)+(?=\s*\$)/i,alias:["class-name-fully-qualified","type-hint"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/(\)\s*:\s*(?:\?\s*)?)\b[a-z_]\w*(?!\\)\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*(?:\?\s*)?)(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,alias:["class-name-fully-qualified","return-type"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}}],constant:n,function:{pattern:/(^|[^\\\w])\\?[a-z_](?:[\w\\]*\w)?(?=\s*\()/i,lookbehind:!0,inside:{punctuation:/\\/}},property:{pattern:/(->\s*)\w+/,lookbehind:!0},number:r,operator:i,punctuation:o};var s={pattern:/\{\$(?:\{(?:\{[^{}]+\}|[^{}]+)\}|[^{}])+\}|(^|[^\\{])\$+(?:\w+(?:\[[^\r\n\[\]]+\]|->\w+)?)/,lookbehind:!0,inside:e.languages.php},l=[{pattern:/<<<'([^']+)'[\r\n](?:.*[\r\n])*?\1;/,alias:"nowdoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<<'[^']+'|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<'?|[';]$/}}}},{pattern:/<<<(?:"([^"]+)"[\r\n](?:.*[\r\n])*?\1;|([a-z_]\w*)[\r\n](?:.*[\r\n])*?\2;)/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<<(?:"[^"]+"|[a-z_]\w*)|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<"?|[";]$/}},interpolation:s}},{pattern:/`(?:\\[\s\S]|[^\\`])*`/,alias:"backtick-quoted-string",greedy:!0},{pattern:/'(?:\\[\s\S]|[^\\'])*'/,alias:"single-quoted-string",greedy:!0},{pattern:/"(?:\\[\s\S]|[^\\"])*"/,alias:"double-quoted-string",greedy:!0,inside:{interpolation:s}}];e.languages.insertBefore("php","variable",{string:l,attribute:{pattern:/#\[(?:[^"'\/#]|\/(?![*/])|\/\/.*$|#(?!\[).*$|\/\*(?:[^*]|\*(?!\/))*\*\/|"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*')+\](?=\s*[a-z$#])/im,greedy:!0,inside:{"attribute-content":{pattern:/^(#\[)[\s\S]+(?=\]$)/,lookbehind:!0,inside:{comment:t,string:l,"attribute-class-name":[{pattern:/([^:]|^)\b[a-z_]\w*(?!\\)\b/i,alias:"class-name",greedy:!0,lookbehind:!0},{pattern:/([^:]|^)(?:\\?\b[a-z_]\w*)+/i,alias:["class-name","class-name-fully-qualified"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}}],constant:n,number:r,operator:i,punctuation:o}},delimiter:{pattern:/^#\[|\]$/,alias:"punctuation"}}}}),e.hooks.add("before-tokenize",function(a){if(/<\?/.test(a.code)){var u=/<\?(?:[^"'/#]|\/(?![*/])|("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|(?:\/\/|#(?!\[))(?:[^?\n\r]|\?(?!>))*(?=$|\?>|[\r\n])|#\[|\/\*(?:[^*]|\*(?!\/))*(?:\*\/|$))*?(?:\?>|$)/g;e.languages["markup-templating"].buildPlaceholders(a,"php",u)}}),e.hooks.add("after-tokenize",function(a){e.languages["markup-templating"].tokenizePlaceholders(a,"php")})})(Prism);Prism.languages.json={property:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,lookbehind:!0,greedy:!0},string:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,lookbehind:!0,greedy:!0},comment:{pattern:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},number:/-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,punctuation:/[{}[\],]/,operator:/:/,boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"}};Prism.languages.webmanifest=Prism.languages.json;(function(e){var t=/[*&][^\s[\]{},]+/,n=/!(?:<[\w\-%#;/?:@&=+$,.!~*'()[\]]+>|(?:[a-zA-Z\d-]*!)?[\w\-%#;/?:@&=+$.~*'()]+)?/,r="(?:"+n.source+"(?:[ ]+"+t.source+")?|"+t.source+"(?:[ ]+"+n.source+")?)",i=/(?:[^\s\x00-\x08\x0e-\x1f!"#%&'*,\-:>?@[\]`{|}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]|[?:-]<PLAIN>)(?:[ \t]*(?:(?![#:])<PLAIN>|:<PLAIN>))*/.source.replace(/<PLAIN>/g,function(){return/[^\s\x00-\x08\x0e-\x1f,[\]{}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]/.source}),o=/"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\\\r\n]|\\.)*'/.source;function s(l,a){a=(a||"").replace(/m/g,"")+"m";var u=/([:\-,[{]\s*(?:\s<<prop>>[ \t]+)?)(?:<<value>>)(?=[ \t]*(?:$|,|\]|\}|(?:[\r\n]\s*)?#))/.source.replace(/<<prop>>/g,function(){return r}).replace(/<<value>>/g,function(){return l});return RegExp(u,a)}e.languages.yaml={scalar:{pattern:RegExp(/([\-:]\s*(?:\s<<prop>>[ \t]+)?[|>])[ \t]*(?:((?:\r?\n|\r)[ \t]+)\S[^\r\n]*(?:\2[^\r\n]+)*)/.source.replace(/<<prop>>/g,function(){return r})),lookbehind:!0,alias:"string"},comment:/#.*/,key:{pattern:RegExp(/((?:^|[:\-,[{\r\n?])[ \t]*(?:<<prop>>[ \t]+)?)<<key>>(?=\s*:\s)/.source.replace(/<<prop>>/g,function(){return r}).replace(/<<key>>/g,function(){return"(?:"+i+"|"+o+")"})),lookbehind:!0,greedy:!0,alias:"atrule"},directive:{pattern:/(^[ \t]*)%.+/m,lookbehind:!0,alias:"important"},datetime:{pattern:s(/\d{4}-\d\d?-\d\d?(?:[tT]|[ \t]+)\d\d?:\d{2}:\d{2}(?:\.\d*)?(?:[ \t]*(?:Z|[-+]\d\d?(?::\d{2})?))?|\d{4}-\d{2}-\d{2}|\d\d?:\d{2}(?::\d{2}(?:\.\d*)?)?/.source),lookbehind:!0,alias:"number"},boolean:{pattern:s(/false|true/.source,"i"),lookbehind:!0,alias:"important"},null:{pattern:s(/null|~/.source,"i"),lookbehind:!0,alias:"important"},string:{pattern:s(o),lookbehind:!0,greedy:!0},number:{pattern:s(/[+-]?(?:0x[\da-f]+|0o[0-7]+|(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?|\.inf|\.nan)/.source,"i"),lookbehind:!0},tag:n,important:t,punctuation:/---|[:[\]{}\-,|>?]|\.\.\./},e.languages.yml=e.languages.yaml})(Prism);(function(e){var t=/(?:[\w-]+|'[^'\n\r]*'|"(?:\\.|[^\\"\r\n])*")/.source;function n(r){return r.replace(/__/g,function(){return t})}e.languages.toml={comment:{pattern:/#.*/,greedy:!0},table:{pattern:RegExp(n(/(^[\t ]*\[\s*(?:\[\s*)?)__(?:\s*\.\s*__)*(?=\s*\])/.source),"m"),lookbehind:!0,greedy:!0,alias:"class-name"},key:{pattern:RegExp(n(/(^[\t ]*|[{,]\s*)__(?:\s*\.\s*__)*(?=\s*=)/.source),"m"),lookbehind:!0,greedy:!0,alias:"property"},string:{pattern:/"""(?:\\[\s\S]|[^\\])*?"""|'''[\s\S]*?'''|'[^'\n\r]*'|"(?:\\.|[^\\"\r\n])*"/,greedy:!0},date:[{pattern:/\b\d{4}-\d{2}-\d{2}(?:[T\s]\d{2}:\d{2}:\d{2}(?:\.\d+)?(?:Z|[+-]\d{2}:\d{2})?)?\b/i,alias:"number"},{pattern:/\b\d{2}:\d{2}:\d{2}(?:\.\d+)?\b/,alias:"number"}],number:/(?:\b0(?:x[\da-zA-Z]+(?:_[\da-zA-Z]+)*|o[0-7]+(?:_[0-7]+)*|b[10]+(?:_[10]+)*))\b|[-+]?\b\d+(?:_\d+)*(?:\.\d+(?:_\d+)*)?(?:[eE][+-]?\d+(?:_\d+)*)?\b|[-+]?\b(?:inf|nan)\b/,boolean:/\b(?:false|true)\b/,punctuation:/[.,=[\]{}]/}})(Prism);(function(e){var t="\\b(?:BASH|BASHOPTS|BASH_ALIASES|BASH_ARGC|BASH_ARGV|BASH_CMDS|BASH_COMPLETION_COMPAT_DIR|BASH_LINENO|BASH_REMATCH|BASH_SOURCE|BASH_VERSINFO|BASH_VERSION|COLORTERM|COLUMNS|COMP_WORDBREAKS|DBUS_SESSION_BUS_ADDRESS|DEFAULTS_PATH|DESKTOP_SESSION|DIRSTACK|DISPLAY|EUID|GDMSESSION|GDM_LANG|GNOME_KEYRING_CONTROL|GNOME_KEYRING_PID|GPG_AGENT_INFO|GROUPS|HISTCONTROL|HISTFILE|HISTFILESIZE|HISTSIZE|HOME|HOSTNAME|HOSTTYPE|IFS|INSTANCE|JOB|LANG|LANGUAGE|LC_ADDRESS|LC_ALL|LC_IDENTIFICATION|LC_MEASUREMENT|LC_MONETARY|LC_NAME|LC_NUMERIC|LC_PAPER|LC_TELEPHONE|LC_TIME|LESSCLOSE|LESSOPEN|LINES|LOGNAME|LS_COLORS|MACHTYPE|MAILCHECK|MANDATORY_PATH|NO_AT_BRIDGE|OLDPWD|OPTERR|OPTIND|ORBIT_SOCKETDIR|OSTYPE|PAPERSIZE|PATH|PIPESTATUS|PPID|PS1|PS2|PS3|PS4|PWD|RANDOM|REPLY|SECONDS|SELINUX_INIT|SESSION|SESSIONTYPE|SESSION_MANAGER|SHELL|SHELLOPTS|SHLVL|SSH_AUTH_SOCK|TERM|UID|UPSTART_EVENTS|UPSTART_INSTANCE|UPSTART_JOB|UPSTART_SESSION|USER|WINDOWID|XAUTHORITY|XDG_CONFIG_DIRS|XDG_CURRENT_DESKTOP|XDG_DATA_DIRS|XDG_GREETER_DATA_DIR|XDG_MENU_PREFIX|XDG_RUNTIME_DIR|XDG_SEAT|XDG_SEAT_PATH|XDG_SESSION_DESKTOP|XDG_SESSION_ID|XDG_SESSION_PATH|XDG_SESSION_TYPE|XDG_VTNR|XMODIFIERS)\\b",n={pattern:/(^(["']?)\w+\2)[ \t]+\S.*/,lookbehind:!0,alias:"punctuation",inside:null},r={bash:n,environment:{pattern:RegExp("\\$"+t),alias:"constant"},variable:[{pattern:/\$?\(\([\s\S]+?\)\)/,greedy:!0,inside:{variable:[{pattern:/(^\$\(\([\s\S]+)\)\)/,lookbehind:!0},/^\$\(\(/],number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee]-?\d+)?/,operator:/--|\+\+|\*\*=?|<<=?|>>=?|&&|\|\||[=!+\-*/%<>^&|]=?|[?~:]/,punctuation:/\(\(?|\)\)?|,|;/}},{pattern:/\$\((?:\([^)]+\)|[^()])+\)|`[^`]+`/,greedy:!0,inside:{variable:/^\$\(|^`|\)$|`$/}},{pattern:/\$\{[^}]+\}/,greedy:!0,inside:{operator:/:[-=?+]?|[!\/]|##?|%%?|\^\^?|,,?/,punctuation:/[\[\]]/,environment:{pattern:RegExp("(\\{)"+t),lookbehind:!0,alias:"constant"}}},/\$(?:\w+|[#?*!@$])/],entity:/\\(?:[abceEfnrtv\\"]|O?[0-7]{1,3}|U[0-9a-fA-F]{8}|u[0-9a-fA-F]{4}|x[0-9a-fA-F]{1,2})/};e.languages.bash={shebang:{pattern:/^#!\s*\/.*/,alias:"important"},comment:{pattern:/(^|[^"{\\$])#.*/,lookbehind:!0},"function-name":[{pattern:/(\bfunction\s+)[\w-]+(?=(?:\s*\(?:\s*\))?\s*\{)/,lookbehind:!0,alias:"function"},{pattern:/\b[\w-]+(?=\s*\(\s*\)\s*\{)/,alias:"function"}],"for-or-select":{pattern:/(\b(?:for|select)\s+)\w+(?=\s+in\s)/,alias:"variable",lookbehind:!0},"assign-left":{pattern:/(^|[\s;|&]|[<>]\()\w+(?:\.\w+)*(?=\+?=)/,inside:{environment:{pattern:RegExp("(^|[\\s;|&]|[<>]\\()"+t),lookbehind:!0,alias:"constant"}},alias:"variable",lookbehind:!0},parameter:{pattern:/(^|\s)-{1,2}(?:\w+:[+-]?)?\w+(?:\.\w+)*(?=[=\s]|$)/,alias:"variable",lookbehind:!0},string:[{pattern:/((?:^|[^<])<<-?\s*)(\w+)\s[\s\S]*?(?:\r?\n|\r)\2/,lookbehind:!0,greedy:!0,inside:r},{pattern:/((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s[\s\S]*?(?:\r?\n|\r)\3/,lookbehind:!0,greedy:!0,inside:{bash:n}},{pattern:/(^|[^\\](?:\\\\)*)"(?:\\[\s\S]|\$\([^)]+\)|\$(?!\()|`[^`]+`|[^"\\`$])*"/,lookbehind:!0,greedy:!0,inside:r},{pattern:/(^|[^$\\])'[^']*'/,lookbehind:!0,greedy:!0},{pattern:/\$'(?:[^'\\]|\\[\s\S])*'/,greedy:!0,inside:{entity:r.entity}}],environment:{pattern:RegExp("\\$?"+t),alias:"constant"},variable:r.variable,function:{pattern:/(^|[\s;|&]|[<>]\()(?:add|apropos|apt|apt-cache|apt-get|aptitude|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|bzip2|cal|cargo|cat|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|column|comm|composer|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|docker|docker-compose|du|egrep|eject|env|ethtool|expand|expect|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|head|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|java|jobs|join|kill|killall|less|link|ln|locate|logname|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|node|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|pnpm|podman|podman-compose|popd|pr|printcap|printenv|ps|pushd|pv|quota|quotacheck|quotactl|ram|rar|rcp|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|sh|shellcheck|shuf|shutdown|sleep|slocate|sort|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|sysctl|tac|tail|tar|tee|time|timeout|top|touch|tr|traceroute|tsort|tty|umount|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|v|vcpkg|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zenity|zip|zsh|zypper)(?=$|[)\s;|&])/,lookbehind:!0},keyword:{pattern:/(^|[\s;|&]|[<>]\()(?:case|do|done|elif|else|esac|fi|for|function|if|in|select|then|until|while)(?=$|[)\s;|&])/,lookbehind:!0},builtin:{pattern:/(^|[\s;|&]|[<>]\()(?:\.|:|alias|bind|break|builtin|caller|cd|command|continue|declare|echo|enable|eval|exec|exit|export|getopts|hash|help|let|local|logout|mapfile|printf|pwd|read|readarray|readonly|return|set|shift|shopt|source|test|times|trap|type|typeset|ulimit|umask|unalias|unset)(?=$|[)\s;|&])/,lookbehind:!0,alias:"class-name"},boolean:{pattern:/(^|[\s;|&]|[<>]\()(?:false|true)(?=$|[)\s;|&])/,lookbehind:!0},"file-descriptor":{pattern:/\B&\d\b/,alias:"important"},operator:{pattern:/\d?<>|>\||\+=|=[=~]?|!=?|<<[<-]?|[&\d]?>>|\d[<>]&?|[<>][&=]?|&[>&]?|\|[&|]?/,inside:{"file-descriptor":{pattern:/^\d/,alias:"important"}}},punctuation:/\$?\(\(?|\)\)?|\.\.|[{}[\];\\]/,number:{pattern:/(^|\s)(?:[1-9]\d*|0)(?:[.,]\d+)?\b/,lookbehind:!0}},n.inside=e.languages.bash;for(var i=["comment","function-name","for-or-select","assign-left","parameter","string","environment","function","keyword","builtin","boolean","file-descriptor","operator","punctuation","number"],o=r.variable[1].inside,s=0;s<i.length;s++)o[i[s]]=e.languages.bash[i[s]];e.languages.sh=e.languages.bash,e.languages.shell=e.languages.bash})(Prism);Prism.languages.sql={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/,lookbehind:!0},variable:[{pattern:/@(["'`])(?:\\[\s\S]|(?!\1)[^\\])+\1/,greedy:!0},/@[\w.$]+/],string:{pattern:/(^|[^@\\])("|')(?:\\[\s\S]|(?!\2)[^\\]|\2\2)*\2/,greedy:!0,lookbehind:!0},identifier:{pattern:/(^|[^@\\])`(?:\\[\s\S]|[^`\\]|``)*`/,greedy:!0,lookbehind:!0,inside:{punctuation:/^`|`$/}},function:/\b(?:AVG|COUNT|FIRST|FORMAT|LAST|LCASE|LEN|MAX|MID|MIN|MOD|NOW|ROUND|SUM|UCASE)(?=\s*\()/i,keyword:/\b(?:ACTION|ADD|AFTER|ALGORITHM|ALL|ALTER|ANALYZE|ANY|APPLY|AS|ASC|AUTHORIZATION|AUTO_INCREMENT|BACKUP|BDB|BEGIN|BERKELEYDB|BIGINT|BINARY|BIT|BLOB|BOOL|BOOLEAN|BREAK|BROWSE|BTREE|BULK|BY|CALL|CASCADED?|CASE|CHAIN|CHAR(?:ACTER|SET)?|CHECK(?:POINT)?|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMNS?|COMMENT|COMMIT(?:TED)?|COMPUTE|CONNECT|CONSISTENT|CONSTRAINT|CONTAINS(?:TABLE)?|CONTINUE|CONVERT|CREATE|CROSS|CURRENT(?:_DATE|_TIME|_TIMESTAMP|_USER)?|CURSOR|CYCLE|DATA(?:BASES?)?|DATE(?:TIME)?|DAY|DBCC|DEALLOCATE|DEC|DECIMAL|DECLARE|DEFAULT|DEFINER|DELAYED|DELETE|DELIMITERS?|DENY|DESC|DESCRIBE|DETERMINISTIC|DISABLE|DISCARD|DISK|DISTINCT|DISTINCTROW|DISTRIBUTED|DO|DOUBLE|DROP|DUMMY|DUMP(?:FILE)?|DUPLICATE|ELSE(?:IF)?|ENABLE|ENCLOSED|END|ENGINE|ENUM|ERRLVL|ERRORS|ESCAPED?|EXCEPT|EXEC(?:UTE)?|EXISTS|EXIT|EXPLAIN|EXTENDED|FETCH|FIELDS|FILE|FILLFACTOR|FIRST|FIXED|FLOAT|FOLLOWING|FOR(?: EACH ROW)?|FORCE|FOREIGN|FREETEXT(?:TABLE)?|FROM|FULL|FUNCTION|GEOMETRY(?:COLLECTION)?|GLOBAL|GOTO|GRANT|GROUP|HANDLER|HASH|HAVING|HOLDLOCK|HOUR|IDENTITY(?:COL|_INSERT)?|IF|IGNORE|IMPORT|INDEX|INFILE|INNER|INNODB|INOUT|INSERT|INT|INTEGER|INTERSECT|INTERVAL|INTO|INVOKER|ISOLATION|ITERATE|JOIN|KEYS?|KILL|LANGUAGE|LAST|LEAVE|LEFT|LEVEL|LIMIT|LINENO|LINES|LINESTRING|LOAD|LOCAL|LOCK|LONG(?:BLOB|TEXT)|LOOP|MATCH(?:ED)?|MEDIUM(?:BLOB|INT|TEXT)|MERGE|MIDDLEINT|MINUTE|MODE|MODIFIES|MODIFY|MONTH|MULTI(?:LINESTRING|POINT|POLYGON)|NATIONAL|NATURAL|NCHAR|NEXT|NO|NONCLUSTERED|NULLIF|NUMERIC|OFF?|OFFSETS?|ON|OPEN(?:DATASOURCE|QUERY|ROWSET)?|OPTIMIZE|OPTION(?:ALLY)?|ORDER|OUT(?:ER|FILE)?|OVER|PARTIAL|PARTITION|PERCENT|PIVOT|PLAN|POINT|POLYGON|PRECEDING|PRECISION|PREPARE|PREV|PRIMARY|PRINT|PRIVILEGES|PROC(?:EDURE)?|PUBLIC|PURGE|QUICK|RAISERROR|READS?|REAL|RECONFIGURE|REFERENCES|RELEASE|RENAME|REPEAT(?:ABLE)?|REPLACE|REPLICATION|REQUIRE|RESIGNAL|RESTORE|RESTRICT|RETURN(?:ING|S)?|REVOKE|RIGHT|ROLLBACK|ROUTINE|ROW(?:COUNT|GUIDCOL|S)?|RTREE|RULE|SAVE(?:POINT)?|SCHEMA|SECOND|SELECT|SERIAL(?:IZABLE)?|SESSION(?:_USER)?|SET(?:USER)?|SHARE|SHOW|SHUTDOWN|SIMPLE|SMALLINT|SNAPSHOT|SOME|SONAME|SQL|START(?:ING)?|STATISTICS|STATUS|STRIPED|SYSTEM_USER|TABLES?|TABLESPACE|TEMP(?:ORARY|TABLE)?|TERMINATED|TEXT(?:SIZE)?|THEN|TIME(?:STAMP)?|TINY(?:BLOB|INT|TEXT)|TOP?|TRAN(?:SACTIONS?)?|TRIGGER|TRUNCATE|TSEQUAL|TYPES?|UNBOUNDED|UNCOMMITTED|UNDEFINED|UNION|UNIQUE|UNLOCK|UNPIVOT|UNSIGNED|UPDATE(?:TEXT)?|USAGE|USE|USER|USING|VALUES?|VAR(?:BINARY|CHAR|CHARACTER|YING)|VIEW|WAITFOR|WARNINGS|WHEN|WHERE|WHILE|WITH(?: ROLLUP|IN)?|WORK|WRITE(?:TEXT)?|YEAR)\b/i,boolean:/\b(?:FALSE|NULL|TRUE)\b/i,number:/\b0x[\da-f]+\b|\b\d+(?:\.\d*)?|\B\.\d+\b/i,operator:/[-+*\/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|DIV|ILIKE|IN|IS|LIKE|NOT|OR|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i,punctuation:/[;[\]()`,.]/};(function(e){var t=/(?:\\.|[^\\\n\r]|(?:\n|\r\n?)(?![\r\n]))/.source;function n(c){return c=c.replace(/<inner>/g,function(){return t}),RegExp(/((?:^|[^\\])(?:\\{2})*)/.source+"(?:"+c+")")}var r=/(?:\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\|\r\n`])+/.source,i=/\|?__(?:\|__)+\|?(?:(?:\n|\r\n?)|(?![\s\S]))/.source.replace(/__/g,function(){return r}),o=/\|?[ \t]*:?-{3,}:?[ \t]*(?:\|[ \t]*:?-{3,}:?[ \t]*)+\|?(?:\n|\r\n?)/.source;e.languages.markdown=e.languages.extend("markup",{}),e.languages.insertBefore("markdown","prolog",{"front-matter-block":{pattern:/(^(?:\s*[\r\n])?)---(?!.)[\s\S]*?[\r\n]---(?!.)/,lookbehind:!0,greedy:!0,inside:{punctuation:/^---|---$/,"front-matter":{pattern:/\S+(?:\s+\S+)*/,alias:["yaml","language-yaml"],inside:e.languages.yaml}}},blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},table:{pattern:RegExp("^"+i+o+"(?:"+i+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+i+o+")(?:"+i+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(r),inside:e.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+i+")"+o+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+i+"$"),inside:{"table-header":{pattern:RegExp(r),alias:"important",inside:e.languages.markdown},punctuation:/\|/}}}},code:[{pattern:/((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/,lookbehind:!0,alias:"keyword"},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:n(/\b__(?:(?!_)<inner>|_(?:(?!_)<inner>)+_)+__\b|\*\*(?:(?!\*)<inner>|\*(?:(?!\*)<inner>)+\*)+\*\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:n(/\b_(?:(?!_)<inner>|__(?:(?!_)<inner>)+__)+_\b|\*(?:(?!\*)<inner>|\*\*(?:(?!\*)<inner>)+\*\*)+\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:n(/(~~?)(?:(?!~)<inner>)+\2/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^~~?)[\s\S]+(?=\1$)/,lookbehind:!0,inside:{}},punctuation:/~~?/}},"code-snippet":{pattern:/(^|[^\\`])(?:``[^`\r\n]+(?:`[^`\r\n]+)*``(?!`)|`[^`\r\n]+`(?!`))/,lookbehind:!0,greedy:!0,alias:["code","keyword"]},url:{pattern:n(/!?\[(?:(?!\])<inner>)+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)|[ \t]?\[(?:(?!\])<inner>)+\])/.source),lookbehind:!0,greedy:!0,inside:{operator:/^!/,content:{pattern:/(^\[)[^\]]+(?=\])/,lookbehind:!0,inside:{}},variable:{pattern:/(^\][ \t]?\[)[^\]]+(?=\]$)/,lookbehind:!0},url:{pattern:/(^\]\()[^\s)]+/,lookbehind:!0},string:{pattern:/(^[ \t]+)"(?:\\.|[^"\\])*"(?=\)$)/,lookbehind:!0}}}}),["url","bold","italic","strike"].forEach(function(c){["url","bold","italic","strike","code-snippet"].forEach(function(d){c!==d&&(e.languages.markdown[c].inside.content.inside[d]=e.languages.markdown[d])})}),e.hooks.add("after-tokenize",function(c){if(c.language!=="markdown"&&c.language!=="md")return;function d(h){if(!(!h||typeof h=="string"))for(var p=0,y=h.length;p<y;p++){var v=h[p];if(v.type!=="code"){d(v.content);continue}var w=v.content[1],x=v.content[3];if(w&&x&&w.type==="code-language"&&x.type==="code-block"&&typeof w.content=="string"){var m=w.content.replace(/\b#/g,"sharp").replace(/\b\+\+/g,"pp");m=(/[a-z][\w-]*/i.exec(m)||[""])[0].toLowerCase();var g="language-"+m;x.alias?typeof x.alias=="string"?x.alias=[x.alias,g]:x.alias.push(g):x.alias=[g]}}}d(c.tokens)}),e.hooks.add("wrap",function(c){if(c.type==="code-block"){for(var d="",h=0,p=c.classes.length;h<p;h++){var y=c.classes[h],v=/language-(.+)/.exec(y);if(v){d=v[1];break}}var w=e.languages[d];if(w)c.content=e.highlight(u(c.content),w,d);else if(d&&d!=="none"&&e.plugins.autoloader){var x="md-"+new Date().valueOf()+"-"+Math.floor(Math.random()*1e16);c.attributes.id=x,e.plugins.autoloader.loadLanguages(d,function(){var m=document.getElementById(x);m&&(m.innerHTML=e.highlight(m.textContent,e.languages[d],d))})}}});var s=RegExp(e.languages.markup.tag.pattern.source,"gi"),l={amp:"&",lt:"<",gt:">",quot:'"'},a=String.fromCodePoint||String.fromCharCode;function u(c){var d=c.replace(s,"");return d=d.replace(/&(\w{1,8}|#x?[\da-f]{1,8});/gi,function(h,p){if(p=p.toLowerCase(),p[0]==="#"){var y;return p[1]==="x"?y=parseInt(p.slice(2),16):y=Number(p.slice(1)),a(y)}else{var v=l[p];return v||h}}),d}e.languages.md=e.languages.markdown})(Prism);Prism.languages.scss=Prism.languages.extend("css",{comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0},atrule:{pattern:/@[\w-](?:\([^()]+\)|[^()\s]|\s+(?!\s))*?(?=\s+[{;])/,inside:{rule:/@[\w-]+/}},url:/(?:[-a-z]+-)?url(?=\()/i,selector:{pattern:/(?=\S)[^@;{}()]?(?:[^@;{}()\s]|\s+(?!\s)|#\{\$[-\w]+\})+(?=\s*\{(?:\}|\s|[^}][^:{}]*[:{][^}]))/,inside:{parent:{pattern:/&/,alias:"important"},placeholder:/%[-\w]+/,variable:/\$[-\w]+|#\{\$[-\w]+\}/}},property:{pattern:/(?:[-\w]|\$[-\w]|#\{\$[-\w]+\})+(?=\s*:)/,inside:{variable:/\$[-\w]+|#\{\$[-\w]+\}/}}});Prism.languages.insertBefore("scss","atrule",{keyword:[/@(?:content|debug|each|else(?: if)?|extend|for|forward|function|if|import|include|mixin|return|use|warn|while)\b/i,{pattern:/( )(?:from|through)(?= )/,lookbehind:!0}]});Prism.languages.insertBefore("scss","important",{variable:/\$[-\w]+|#\{\$[-\w]+\}/});Prism.languages.insertBefore("scss","function",{"module-modifier":{pattern:/\b(?:as|hide|show|with)\b/i,alias:"keyword"},placeholder:{pattern:/%[-\w]+/,alias:"selector"},statement:{pattern:/\B!(?:default|optional)\b/i,alias:"keyword"},boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"},operator:{pattern:/(\s)(?:[-+*\/%]|[=!]=|<=?|>=?|and|not|or)(?=\s)/,lookbehind:!0}});Prism.languages.scss.atrule.inside.rest=Prism.languages.scss;(function(e){var t=/\\[\r\n](?:\s|\\[\r\n]|#.*(?!.))*(?![\s#]|\\[\r\n])/.source,n=/(?:[ \t]+(?![ \t])(?:<SP_BS>)?|<SP_BS>)/.source.replace(/<SP_BS>/g,function(){return t}),r=/"(?:[^"\\\r\n]|\\(?:\r\n|[\s\S]))*"|'(?:[^'\\\r\n]|\\(?:\r\n|[\s\S]))*'/.source,i=/--[\w-]+=(?:<STR>|(?!["'])(?:[^\s\\]|\\.)+)/.source.replace(/<STR>/g,function(){return r}),o={pattern:RegExp(r),greedy:!0},s={pattern:/(^[ \t]*)#.*/m,lookbehind:!0,greedy:!0};function l(a,u){return a=a.replace(/<OPT>/g,function(){return i}).replace(/<SP>/g,function(){return n}),RegExp(a,u)}e.languages.docker={instruction:{pattern:/(^[ \t]*)(?:ADD|ARG|CMD|COPY|ENTRYPOINT|ENV|EXPOSE|FROM|HEALTHCHECK|LABEL|MAINTAINER|ONBUILD|RUN|SHELL|STOPSIGNAL|USER|VOLUME|WORKDIR)(?=\s)(?:\\.|[^\r\n\\])*(?:\\$(?:\s|#.*$)*(?![\s#])(?:\\.|[^\r\n\\])*)*/im,lookbehind:!0,greedy:!0,inside:{options:{pattern:l(/(^(?:ONBUILD<SP>)?\w+<SP>)<OPT>(?:<SP><OPT>)*/.source,"i"),lookbehind:!0,greedy:!0,inside:{property:{pattern:/(^|\s)--[\w-]+/,lookbehind:!0},string:[o,{pattern:/(=)(?!["'])(?:[^\s\\]|\\.)+/,lookbehind:!0}],operator:/\\$/m,punctuation:/=/}},keyword:[{pattern:l(/(^(?:ONBUILD<SP>)?HEALTHCHECK<SP>(?:<OPT><SP>)*)(?:CMD|NONE)\b/.source,"i"),lookbehind:!0,greedy:!0},{pattern:l(/(^(?:ONBUILD<SP>)?FROM<SP>(?:<OPT><SP>)*(?!--)[^ \t\\]+<SP>)AS/.source,"i"),lookbehind:!0,greedy:!0},{pattern:l(/(^ONBUILD<SP>)\w+/.source,"i"),lookbehind:!0,greedy:!0},{pattern:/^\w+/,greedy:!0}],comment:s,string:o,variable:/\$(?:\w+|\{[^{}"'\\]*\})/,operator:/\\$/m}},comment:s},e.languages.dockerfile=e.languages.docker})(Prism);Prism.languages.hcl={comment:/(?:\/\/|#).*|\/\*[\s\S]*?(?:\*\/|$)/,heredoc:{pattern:/<<-?(\w+\b)[\s\S]*?^[ \t]*\1/m,greedy:!0,alias:"string"},keyword:[{pattern:/(?:data|resource)\s+(?:"(?:\\[\s\S]|[^\\"])*")(?=\s+"[\w-]+"\s+\{)/i,inside:{type:{pattern:/(resource|data|\s+)(?:"(?:\\[\s\S]|[^\\"])*")/i,lookbehind:!0,alias:"variable"}}},{pattern:/(?:backend|module|output|provider|provisioner|variable)\s+(?:[\w-]+|"(?:\\[\s\S]|[^\\"])*")\s+(?=\{)/i,inside:{type:{pattern:/(backend|module|output|provider|provisioner|variable)\s+(?:[\w-]+|"(?:\\[\s\S]|[^\\"])*")\s+/i,lookbehind:!0,alias:"variable"}}},/[\w-]+(?=\s+\{)/],property:[/[-\w\.]+(?=\s*=(?!=))/,/"(?:\\[\s\S]|[^\\"])+"(?=\s*[:=])/],string:{pattern:/"(?:[^\\$"]|\\[\s\S]|\$(?:(?=")|\$+(?!\$)|[^"${])|\$\{(?:[^{}"]|"(?:[^\\"]|\\[\s\S])*")*\})*"/,greedy:!0,inside:{interpolation:{pattern:/(^|[^$])\$\{(?:[^{}"]|"(?:[^\\"]|\\[\s\S])*")*\}/,lookbehind:!0,inside:{type:{pattern:/(\b(?:count|data|local|module|path|self|terraform|var)\b\.)[\w\*]+/i,lookbehind:!0,alias:"variable"},keyword:/\b(?:count|data|local|module|path|self|terraform|var)\b/i,function:/\w+(?=\()/,string:{pattern:/"(?:\\[\s\S]|[^\\"])*"/,greedy:!0},number:/\b0x[\da-f]+\b|\b\d+(?:\.\d*)?(?:e[+-]?\d+)?/i,punctuation:/[!\$#%&'()*+,.\/;<=>@\[\\\]^`{|}~?:]/}}}},number:/\b0x[\da-f]+\b|\b\d+(?:\.\d*)?(?:e[+-]?\d+)?/i,boolean:/\b(?:false|true)\b/i,punctuation:/[=\[\]{}]/};Prism.languages.graphql={comment:/#.*/,description:{pattern:/(?:"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*")(?=\s*[a-z_])/i,greedy:!0,alias:"string",inside:{"language-markdown":{pattern:/(^"(?:"")?)(?!\1)[\s\S]+(?=\1$)/,lookbehind:!0,inside:Prism.languages.markdown}}},string:{pattern:/"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*"/,greedy:!0},number:/(?:\B-|\b)\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,boolean:/\b(?:false|true)\b/,variable:/\$[a-z_]\w*/i,directive:{pattern:/@[a-z_]\w*/i,alias:"function"},"attr-name":{pattern:/\b[a-z_]\w*(?=\s*(?:\((?:[^()"]|"(?:\\.|[^\\"\r\n])*")*\))?:)/i,greedy:!0},"atom-input":{pattern:/\b[A-Z]\w*Input\b/,alias:"class-name"},scalar:/\b(?:Boolean|Float|ID|Int|String)\b/,constant:/\b[A-Z][A-Z_\d]*\b/,"class-name":{pattern:/(\b(?:enum|implements|interface|on|scalar|type|union)\s+|&\s*|:\s*|\[)[A-Z_]\w*/,lookbehind:!0},fragment:{pattern:/(\bfragment\s+|\.{3}\s*(?!on\b))[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},"definition-mutation":{pattern:/(\bmutation\s+)[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},"definition-query":{pattern:/(\bquery\s+)[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},keyword:/\b(?:directive|enum|extend|fragment|implements|input|interface|mutation|on|query|repeatable|scalar|schema|subscription|type|union)\b/,operator:/[!=|&]|\.{3}/,"property-query":/\w+(?=\s*\()/,object:/\w+(?=\s*\{)/,punctuation:/[!(){}\[\]:=,]/,property:/\w+/};Prism.hooks.add("after-tokenize",function(t){if(t.language!=="graphql")return;var n=t.tokens.filter(function(v){return typeof v!="string"&&v.type!=="comment"&&v.type!=="scalar"}),r=0;function i(v){return n[r+v]}function o(v,w){w=w||0;for(var x=0;x<v.length;x++){var m=i(x+w);if(!m||m.type!==v[x])return!1}return!0}function s(v,w){for(var x=1,m=r;m<n.length;m++){var g=n[m],k=g.content;if(g.type==="punctuation"&&typeof k=="string"){if(v.test(k))x++;else if(w.test(k)&&(x--,x===0))return m}}return-1}function l(v,w){var x=v.alias;x?Array.isArray(x)||(v.alias=x=[x]):v.alias=x=[],x.push(w)}for(;r<n.length;){var a=n[r++];if(a.type==="keyword"&&a.content==="mutation"){var u=[];if(o(["definition-mutation","punctuation"])&&i(1).content==="("){r+=2;var c=s(/^\($/,/^\)$/);if(c===-1)continue;for(;r<c;r++){var d=i(0);d.type==="variable"&&(l(d,"variable-input"),u.push(d.content))}r=c+1}if(o(["punctuation","property-query"])&&i(0).content==="{"&&(r++,l(i(0),"property-mutation"),u.length>0)){var h=s(/^\{$/,/^\}$/);if(h===-1)continue;for(var p=r;p<h;p++){var y=n[p];y.type==="variable"&&u.indexOf(y.content)>=0&&l(y,"variable-input")}}}}});(function(e){var t=/\b(?:bool|bytes|double|s?fixed(?:32|64)|float|[su]?int(?:32|64)|string)\b/;e.languages.protobuf=e.languages.extend("clike",{"class-name":[{pattern:/(\b(?:enum|extend|message|service)\s+)[A-Za-z_]\w*(?=\s*\{)/,lookbehind:!0},{pattern:/(\b(?:rpc\s+\w+|returns)\s*\(\s*(?:stream\s+)?)\.?[A-Za-z_]\w*(?:\.[A-Za-z_]\w*)*(?=\s*\))/,lookbehind:!0}],keyword:/\b(?:enum|extend|extensions|import|message|oneof|option|optional|package|public|repeated|required|reserved|returns|rpc(?=\s+\w)|service|stream|syntax|to)\b(?!\s*=\s*\d)/,function:/\b[a-z_]\w*(?=\s*\()/i}),e.languages.insertBefore("protobuf","operator",{map:{pattern:/\bmap<\s*[\w.]+\s*,\s*[\w.]+\s*>(?=\s+[a-z_]\w*\s*[=;])/i,alias:"class-name",inside:{punctuation:/[<>.,]/,builtin:t}},builtin:t,"positional-class-name":{pattern:/(?:\b|\B\.)[a-z_]\w*(?:\.[a-z_]\w*)*(?=\s+[a-z_]\w*\s*[=;])/i,alias:"class-name",inside:{punctuation:/\./}},annotation:{pattern:/(\[\s*)[a-z_]\w*(?=\s*=)/i,lookbehind:!0}})})(Prism);Prism.languages.ini={comment:{pattern:/(^[ \f\t\v]*)[#;][^\n\r]*/m,lookbehind:!0},section:{pattern:/(^[ \f\t\v]*)\[[^\n\r\]]*\]?/m,lookbehind:!0,inside:{"section-name":{pattern:/(^\[[ \f\t\v]*)[^ \f\t\v\]]+(?:[ \f\t\v]+[^ \f\t\v\]]+)*/,lookbehind:!0,alias:"selector"},punctuation:/\[|\]/}},key:{pattern:/(^[ \f\t\v]*)[^ \f\n\r\t\v=]+(?:[ \f\t\v]+[^ \f\n\r\t\v=]+)*(?=[ \f\t\v]*=)/m,lookbehind:!0,alias:"attr-name"},value:{pattern:/(=[ \f\t\v]*)[^ \f\n\r\t\v]+(?:[ \f\t\v]+[^ \f\n\r\t\v]+)*/,lookbehind:!0,alias:"attr-value",inside:{"inner-value":{pattern:/^("|').+(?=\1$)/,lookbehind:!0}}},punctuation:/=/};Prism.languages.makefile={comment:{pattern:/(^|[^\\])#(?:\\(?:\r\n|[\s\S])|[^\\\r\n])*/,lookbehind:!0},string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"builtin-target":{pattern:/\.[A-Z][^:#=\s]+(?=\s*:(?!=))/,alias:"builtin"},target:{pattern:/^(?:[^:=\s]|[ \t]+(?![\s:]))+(?=\s*:(?!=))/m,alias:"symbol",inside:{variable:/\$+(?:(?!\$)[^(){}:#=\s]+|(?=[({]))/}},variable:/\$+(?:(?!\$)[^(){}:#=\s]+|\([@*%<^+?][DF]\)|(?=[({]))/,keyword:/-include\b|\b(?:define|else|endef|endif|export|ifn?def|ifn?eq|include|override|private|sinclude|undefine|unexport|vpath)\b/,function:{pattern:/(\()(?:abspath|addsuffix|and|basename|call|dir|error|eval|file|filter(?:-out)?|findstring|firstword|flavor|foreach|guile|if|info|join|lastword|load|notdir|or|origin|patsubst|realpath|shell|sort|strip|subst|suffix|value|warning|wildcard|word(?:list|s)?)(?=[ \t])/,lookbehind:!0},operator:/(?:::|[?:+!])?=|[|@]/,punctuation:/[:;(){}]/};Prism.languages.lua={comment:/^#!.+|--(?:\[(=*)\[[\s\S]*?\]\1\]|.*)/m,string:{pattern:/(["'])(?:(?!\1)[^\\\r\n]|\\z(?:\r\n|\s)|\\(?:\r\n|[^z]))*\1|\[(=*)\[[\s\S]*?\]\2\]/,greedy:!0},number:/\b0x[a-f\d]+(?:\.[a-f\d]*)?(?:p[+-]?\d+)?\b|\b\d+(?:\.\B|(?:\.\d*)?(?:e[+-]?\d+)?\b)|\B\.\d+(?:e[+-]?\d+)?\b/i,keyword:/\b(?:and|break|do|else|elseif|end|false|for|function|goto|if|in|local|nil|not|or|repeat|return|then|true|until|while)\b/,function:/(?!\d)\w+(?=\s*(?:[({]))/,operator:[/[-+*%^&|#]|\/\/?|<[<=]?|>[>=]?|[=~]=?/,{pattern:/(^|[^.])\.\.(?!\.)/,lookbehind:!0}],punctuation:/[\[\](){},;]|\.+|:+/};(function(e){var t=[/\b(?:async|sync|yield)\*/,/\b(?:abstract|assert|async|await|break|case|catch|class|const|continue|covariant|default|deferred|do|dynamic|else|enum|export|extends|extension|external|factory|final|finally|for|get|hide|if|implements|import|in|interface|library|mixin|new|null|on|operator|part|rethrow|return|set|show|static|super|switch|sync|this|throw|try|typedef|var|void|while|with|yield)\b/],n=/(^|[^\w.])(?:[a-z]\w*\s*\.\s*)*(?:[A-Z]\w*\s*\.\s*)*/.source,r={pattern:RegExp(n+/[A-Z](?:[\d_A-Z]*[a-z]\w*)?\b/.source),lookbehind:!0,inside:{namespace:{pattern:/^[a-z]\w*(?:\s*\.\s*[a-z]\w*)*(?:\s*\.)?/,inside:{punctuation:/\./}}}};e.languages.dart=e.languages.extend("clike",{"class-name":[r,{pattern:RegExp(n+/[A-Z]\w*(?=\s+\w+\s*[;,=()])/.source),lookbehind:!0,inside:r.inside}],keyword:t,operator:/\bis!|\b(?:as|is)\b|\+\+|--|&&|\|\||<<=?|>>=?|~(?:\/=?)?|[+\-*\/%&^|=!<>]=?|\?/}),e.languages.insertBefore("dart","string",{"string-literal":{pattern:/r?(?:("""|''')[\s\S]*?\1|(["'])(?:\\.|(?!\2)[^\\\r\n])*\2(?!\2))/,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$(?:\w+|\{(?:[^{}]|\{[^{}]*\})*\})/,lookbehind:!0,inside:{punctuation:/^\$\{?|\}$/,expression:{pattern:/[\s\S]+/,inside:e.languages.dart}}},string:/[\s\S]+/}},string:void 0}),e.languages.insertBefore("dart","class-name",{metadata:{pattern:/@\w+/,alias:"function"}}),e.languages.insertBefore("dart","class-name",{generics:{pattern:/<(?:[\w\s,.&?]|<(?:[\w\s,.&?]|<(?:[\w\s,.&?]|<[\w\s,.&?]*>)*>)*>)*>/,inside:{"class-name":r,keyword:t,punctuation:/[<>(),.:]/,operator:/[?&|]/}}})})(Prism);const z1={ts:"typescript",mts:"typescript",cts:"typescript",tsx:"tsx",js:"javascript",mjs:"javascript",cjs:"javascript",jsx:"jsx",go:"go",py:"python",rs:"rust",java:"java",kt:"kotlin",kts:"kotlin",swift:"swift",c:"c",h:"c",cc:"cpp",cpp:"cpp",hpp:"cpp",cs:"csharp",rb:"ruby",php:"php",json:"json",jsonc:"json",yml:"yaml",yaml:"yaml",toml:"toml",sh:"bash",bash:"bash",zsh:"bash",sql:"sql",md:"markdown",mdx:"markdown",css:"css",scss:"scss",html:"markup",htm:"markup",xml:"markup",svg:"markup",vue:"markup",hcl:"hcl",tf:"hcl",graphql:"graphql",gql:"graphql",proto:"protobuf",ini:"ini",lua:"lua",dart:"dart"},Yp={Dockerfile:"docker",Makefile:"makefile",GNUmakefile:"makefile",".env":"bash"};function B1(e){const t=e.split("/").pop()??"";if(Yp[t])return Yp[t];if(t.startsWith("Dockerfile"))return"docker";const n=t.includes(".")?t.split(".").pop().toLowerCase():"",r=z1[n];return r&&gl.languages[r]?r:void 0}function Fd(e,t){const n=gl.languages[t];if(!n)return e.map(s=>[{types:"",text:s}]);const r=[[]],i=(s,l)=>{l.split(`
|
|
112
|
+
`).forEach((u,c)=>{c>0&&r.push([]),u&&r[r.length-1].push({types:s,text:u})})},o=(s,l)=>{for(const a of s)if(typeof a=="string")i(l,a);else{const u=[a.type,...a.alias?Array.isArray(a.alias)?a.alias:[a.alias]:[]].join(" "),c=l?`${l} ${u}`:u;typeof a.content=="string"?i(c,a.content):o(Array.isArray(a.content)?a.content:[a.content],c)}};for(o(gl.tokenize(e.join(`
|
|
113
|
+
`),n),"");r.length<e.length;)r.push([]);return r}const Xp=5e3,Qp=1e3;function U1(e,t){const n=B1(e.path);if(!n)return;let r=0;for(const o of e.chunks)for(const s of o.lines)if(++r>Xp||s.content.length>Qp)return;const i=new Map;for(const o of e.chunks)Zp(o,"old",n,i),Zp(o,"new",n,i);return t&&t.length<=Xp&&t.every(o=>o.length<=Qp)&&Fd(t,n).forEach((o,s)=>i.set(`new:${s+1}`,o)),i}function Zp(e,t,n,r){const i=e.lines.filter(s=>s.type==="normal"||s.type===(t==="old"?"delete":"add"));if(!i.length)return;const o=Fd(i.map(s=>s.content),n);i.forEach((s,l)=>r.set(`${t}:${t==="old"?s.oldLine:s.newLine}`,o[l]))}function H1(e,t){const n=t==null?void 0:t.toLowerCase();if(!(!n||!gl.languages[n]||e.length>1e5))return Fd(e.split(`
|
|
114
|
+
`),n)}function W1({file:e,version:t}){const n=e.status==="added"?["new"]:e.status==="removed"?["old"]:["old","new"];return f.jsx("div",{className:`fs-images n${n.length}`,children:n.map(r=>f.jsx(V1,{side:r,path:r==="old"?e.oldPath??e.path:e.path,version:t},r))})}function V1({side:e,path:t,version:n}){const[r,i]=U.useState(null),[o,s]=U.useState(!1);return f.jsxs("figure",{className:`fs-image ${e}`,children:[f.jsxs("figcaption",{children:[f.jsx("span",{className:`fs-image-side ${e}`,children:e==="old"?"変更前":"変更後"}),r&&f.jsx("span",{className:"ds-muted",children:r})]}),f.jsx("div",{className:"fs-image-frame",children:o?f.jsx("span",{className:"ds-muted",children:"表示できませんでした"}):f.jsx("img",{src:ex(t,e,n),alt:`${t}(${e==="old"?"変更前":"変更後"})`,onLoad:l=>i(`${l.currentTarget.naturalWidth} × ${l.currentTarget.naturalHeight}`),onError:()=>s(!0)})})]})}function G1(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const K1=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,q1=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Y1={};function Jp(e,t){return(Y1.jsx?q1:K1).test(e)}const X1=/[ \t\n\f\r]/g;function Q1(e){return typeof e=="object"?e.type==="text"?eh(e.value):!1:eh(e)}function eh(e){return e.replace(X1,"")===""}class Bo{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}Bo.prototype.normal={};Bo.prototype.property={};Bo.prototype.space=void 0;function px(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new Bo(n,r,t)}function dc(e){return e.toLowerCase()}class Rt{constructor(t,n){this.attribute=n,this.property=t}}Rt.prototype.attribute="";Rt.prototype.booleanish=!1;Rt.prototype.boolean=!1;Rt.prototype.commaOrSpaceSeparated=!1;Rt.prototype.commaSeparated=!1;Rt.prototype.defined=!1;Rt.prototype.mustUseProperty=!1;Rt.prototype.number=!1;Rt.prototype.overloadedBoolean=!1;Rt.prototype.property="";Rt.prototype.spaceSeparated=!1;Rt.prototype.space=void 0;let Z1=0;const ke=Br(),Je=Br(),fc=Br(),le=Br(),Me=Br(),$r=Br(),Dt=Br();function Br(){return 2**++Z1}const pc=Object.freeze(Object.defineProperty({__proto__:null,boolean:ke,booleanish:Je,commaOrSpaceSeparated:Dt,commaSeparated:$r,number:le,overloadedBoolean:fc,spaceSeparated:Me},Symbol.toStringTag,{value:"Module"})),Fa=Object.keys(pc);class Dd extends Rt{constructor(t,n,r,i){let o=-1;if(super(t,n),th(this,"space",i),typeof r=="number")for(;++o<Fa.length;){const s=Fa[o];th(this,Fa[o],(r&pc[s])===pc[s])}}}Dd.prototype.defined=!0;function th(e,t,n){n&&(e[t]=n)}function $i(e){const t={},n={};for(const[r,i]of Object.entries(e.properties)){const o=new Dd(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(o.mustUseProperty=!0),t[r]=o,n[dc(r)]=r,n[dc(o.attribute)]=r}return new Bo(t,n,e.space)}const hx=$i({properties:{ariaActiveDescendant:null,ariaAtomic:Je,ariaAutoComplete:null,ariaBusy:Je,ariaChecked:Je,ariaColCount:le,ariaColIndex:le,ariaColSpan:le,ariaControls:Me,ariaCurrent:null,ariaDescribedBy:Me,ariaDetails:null,ariaDisabled:Je,ariaDropEffect:Me,ariaErrorMessage:null,ariaExpanded:Je,ariaFlowTo:Me,ariaGrabbed:Je,ariaHasPopup:null,ariaHidden:Je,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Me,ariaLevel:le,ariaLive:null,ariaModal:Je,ariaMultiLine:Je,ariaMultiSelectable:Je,ariaOrientation:null,ariaOwns:Me,ariaPlaceholder:null,ariaPosInSet:le,ariaPressed:Je,ariaReadOnly:Je,ariaRelevant:null,ariaRequired:Je,ariaRoleDescription:Me,ariaRowCount:le,ariaRowIndex:le,ariaRowSpan:le,ariaSelected:Je,ariaSetSize:le,ariaSort:null,ariaValueMax:le,ariaValueMin:le,ariaValueNow:le,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function mx(e,t){return t in e?e[t]:t}function gx(e,t){return mx(e,t.toLowerCase())}const J1=$i({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:$r,acceptCharset:Me,accessKey:Me,action:null,allow:null,allowFullScreen:ke,allowPaymentRequest:ke,allowUserMedia:ke,alpha:ke,alt:null,as:null,async:ke,autoCapitalize:null,autoComplete:Me,autoFocus:ke,autoPlay:ke,blocking:Me,capture:null,charSet:null,checked:ke,cite:null,className:Me,closedBy:null,colorSpace:null,cols:le,colSpan:le,command:null,commandFor:null,content:null,contentEditable:Je,controls:ke,controlsList:Me,coords:le|$r,crossOrigin:null,data:null,dateTime:null,decoding:null,default:ke,defer:ke,dir:null,dirName:null,disabled:ke,download:fc,draggable:Je,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:ke,formTarget:null,headers:Me,height:le,hidden:fc,high:le,href:null,hrefLang:null,htmlFor:Me,httpEquiv:Me,id:null,imageSizes:null,imageSrcSet:null,inert:ke,inputMode:null,integrity:null,is:null,isMap:ke,itemId:null,itemProp:Me,itemRef:Me,itemScope:ke,itemType:Me,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:ke,low:le,manifest:null,max:null,maxLength:le,media:null,method:null,min:null,minLength:le,multiple:ke,muted:ke,name:null,nonce:null,noModule:ke,noValidate:ke,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:ke,optimum:le,pattern:null,ping:Me,placeholder:null,playsInline:ke,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:ke,referrerPolicy:null,rel:Me,required:ke,reversed:ke,rows:le,rowSpan:le,sandbox:Me,scope:null,scoped:ke,seamless:ke,selected:ke,shadowRootClonable:ke,shadowRootCustomElementRegistry:ke,shadowRootDelegatesFocus:ke,shadowRootMode:null,shadowRootSerializable:ke,shape:null,size:le,sizes:null,slot:null,span:le,spellCheck:Je,src:null,srcDoc:null,srcLang:null,srcSet:null,start:le,step:null,style:null,tabIndex:le,target:null,title:null,translate:null,type:null,typeMustMatch:ke,useMap:null,value:Je,width:le,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Me,axis:null,background:null,bgColor:null,border:le,borderColor:null,bottomMargin:le,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:ke,declare:ke,event:null,face:null,frame:null,frameBorder:null,hSpace:le,leftMargin:le,link:null,longDesc:null,lowSrc:null,marginHeight:le,marginWidth:le,noResize:ke,noHref:ke,noShade:ke,noWrap:ke,object:null,profile:null,prompt:null,rev:null,rightMargin:le,rules:null,scheme:null,scrolling:Je,standby:null,summary:null,text:null,topMargin:le,valueType:null,version:null,vAlign:null,vLink:null,vSpace:le,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:ke,disablePictureInPicture:ke,disableRemotePlayback:ke,exportParts:$r,part:Me,prefix:null,property:null,results:le,security:null,unselectable:null},space:"html",transform:gx}),eE=$i({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",maskType:"mask-type",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:Dt,accentHeight:le,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:le,amplitude:le,arabicForm:null,ascent:le,attributeName:null,attributeType:null,azimuth:le,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:le,by:null,calcMode:null,capHeight:le,className:Me,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:le,diffuseConstant:le,direction:null,display:null,dur:null,divisor:le,dominantBaseline:null,download:ke,dx:null,dy:null,edgeMode:null,editable:null,elevation:le,enableBackground:null,end:null,event:null,exponent:le,externalResourcesRequired:null,fill:null,fillOpacity:le,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:$r,g2:$r,glyphName:$r,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:le,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:le,horizOriginX:le,horizOriginY:le,id:null,ideographic:le,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:le,k:le,k1:le,k2:le,k3:le,k4:le,kernelMatrix:Dt,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:le,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:le,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:le,overlineThickness:le,paintOrder:null,panose1:null,path:null,pathLength:le,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Me,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:le,pointsAtY:le,pointsAtZ:le,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Dt,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Dt,rev:Dt,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Dt,requiredFeatures:Dt,requiredFonts:Dt,requiredFormats:Dt,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:le,specularExponent:le,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:le,strikethroughThickness:le,string:null,stroke:null,strokeDashArray:Dt,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:le,strokeOpacity:le,strokeWidth:null,style:null,surfaceScale:le,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Dt,tabIndex:le,tableValues:null,target:null,targetX:le,targetY:le,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Dt,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:le,underlineThickness:le,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:le,values:null,vAlphabetic:le,vMathematical:le,vectorEffect:null,vHanging:le,vIdeographic:le,version:null,vertAdvY:le,vertOriginX:le,vertOriginY:le,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:le,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:mx}),yx=$i({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),xx=$i({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:gx}),vx=$i({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),tE={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},nE=/[A-Z]/g,nh=/-[a-z]/g,rE=/^data[-\w.:]+$/i;function iE(e,t){const n=dc(t);let r=t,i=Rt;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&rE.test(t)){if(t.charAt(4)==="-"){const o=t.slice(5).replace(nh,sE);r="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=t.slice(4);if(!nh.test(o)){let s=o.replace(nE,oE);s.charAt(0)!=="-"&&(s="-"+s),t="data"+s}}i=Dd}return new i(r,t)}function oE(e){return"-"+e.toLowerCase()}function sE(e){return e.charAt(1).toUpperCase()}const lE=px([hx,J1,yx,xx,vx],"html"),zd=px([hx,eE,yx,xx,vx],"svg");function aE(e){return e.join(" ").trim()}var rh=/\/\*(?:[^*]|\*(?!\/))*\*\//g,uE=/\n/g,cE=/^\s*/,dE=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,fE=/^:\s*/,pE=/^((?:'(?:\\.|[^'\\])*'|"(?:\\.|[^"\\])*"|url\((?:'(?:\\.|[^'\\])*'|"(?:\\.|[^"\\])*"|[^)]*)\)|[^};])+)/,hE=/^[;\s]*/,mE=`
|
|
115
|
+
`,ih="/",oh="*",Hi="",gE="comment",yE="declaration";function xE(e,t){if(typeof e!="string")throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var n=1,r=1;function i(y){var v=y.match(uE);v&&(n+=v.length);var w=y.lastIndexOf(mE);r=~w?y.length-w:r+y.length}function o(){var y={line:n,column:r};return function(v){return v.position=new s(y),u(),v}}function s(y){this.start=y,this.end={line:n,column:r},this.source=t.source}s.prototype.content=e;function l(y){var v=new Error(t.source+":"+n+":"+r+": "+y);if(v.reason=y,v.filename=t.source,v.line=n,v.column=r,v.source=e,!t.silent)throw v}function a(y){var v=y.exec(e);if(v){var w=v[0];return i(w),e=e.slice(w.length),v}}function u(){a(cE)}function c(y){for(var v;v=d();)y.push(v);return y}function d(){var y=o();if(!(ih!=e.charAt(0)||oh!=e.charAt(1))){for(var v=2;Hi!=e.charAt(v)&&(oh!=e.charAt(v)||ih!=e.charAt(v+1));)++v;if(v+=2,Hi===e.charAt(v-1))return l("End of comment missing");var w=e.slice(2,v-2);return r+=2,i(w),e=e.slice(v),r+=2,y({type:gE,comment:w})}}function h(){var y=o(),v=a(dE);if(v){if(d(),!a(fE))return l("property missing ':'");var w=a(pE),x=y({type:yE,property:v[0].replace(rh,Hi).trim(),value:w?w[0].replace(rh,Hi).trim():Hi});return a(hE),x}}function p(){var y=[];c(y);for(var v;v=h();)y.push(v),c(y);return y}return u(),p()}function vE(e,t){let n=null;if(!e||typeof e!="string")return n;const r=xE(e),i=typeof t=="function";return r.forEach(o=>{if(o.type!=="declaration")return;const{property:s,value:l}=o;i?t(s,l,o):l&&(n=n??{},n[s]=l)}),n}const wx=kx("end"),Bd=kx("start");function kx(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function wE(e){const t=Bd(e),n=wx(e);if(t&&n)return{start:t,end:n}}function ao(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?sh(e.position):"start"in e||"end"in e?sh(e):"line"in e||"column"in e?hc(e):""}function hc(e){return lh(e&&e.line)+":"+lh(e&&e.column)}function sh(e){return hc(e&&e.start)+"-"+hc(e&&e.end)}function lh(e){return e&&typeof e=="number"?e:1}class Hl extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",o={},s=!1;if(n&&("line"in n&&"column"in n?o={place:n}:"start"in n&&"end"in n?o={place:n}:"type"in n?o={ancestors:[n],place:n.position}:o={...n}),typeof t=="string"?i=t:!o.cause&&t&&(s=!0,i=t.message,o.cause=t),!o.ruleId&&!o.source&&typeof r=="string"){const a=r.indexOf(":");a===-1?o.ruleId=r:(o.source=r.slice(0,a),o.ruleId=r.slice(a+1))}if(!o.place&&o.ancestors){const a=o.ancestors[o.ancestors.length-1];a&&(o.place=a.position)}const l=o.place&&"start"in o.place?o.place.start:o.place;this.ancestors=o.ancestors||void 0,this.cause=o.cause||void 0,this.column=l?l.column:void 0,this.fatal=void 0,this.file="",this.message=i,this.line=l?l.line:void 0,this.name=ao(o.place)||"1:1",this.place=o.place||void 0,this.reason=this.message,this.ruleId=o.ruleId||void 0,this.source=o.source||void 0,this.stack=s&&o.cause&&typeof o.cause.stack=="string"?o.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}Object.defineProperties(Hl.prototype,{file:{configurable:!0,enumerable:!0,value:"",writable:!0},name:{configurable:!0,enumerable:!0,value:"",writable:!0},reason:{configurable:!0,enumerable:!0,value:"",writable:!0},message:{configurable:!0,enumerable:!0,value:"",writable:!0},stack:{configurable:!0,enumerable:!0,value:"",writable:!0},column:{configurable:!0,enumerable:!0,writable:!0},line:{configurable:!0,enumerable:!0,writable:!0},ancestors:{configurable:!0,enumerable:!0,writable:!0},cause:{configurable:!0,enumerable:!0,writable:!0},fatal:{configurable:!0,enumerable:!0,writable:!0},place:{configurable:!0,enumerable:!0,writable:!0},ruleId:{configurable:!0,enumerable:!0,writable:!0},source:{configurable:!0,enumerable:!0,writable:!0}});const Ud={}.hasOwnProperty,kE=new Map,bE=/[A-Z]/g,EE=/-([a-z])/g,SE=new Set(["table","tbody","thead","tfoot","tr"]),CE=new Set(["td","th"]),bx="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function NE(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=OE(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=AE(n,t.jsx,t.jsxs)}const i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?zd:lE,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},o=Ex(i,e,void 0);return o&&typeof o!="string"?o:i.create(e,i.Fragment,{children:o||void 0},void 0)}function Ex(e,t,n){if(t.type==="element")return jE(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return _E(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return $E(e,t,n);if(t.type==="mdxjsEsm")return TE(e,t);if(t.type==="root")return IE(e,t,n);if(t.type==="text")return LE(e,t)}function jE(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=zd,e.schema=i),e.ancestors.push(t);const o=Cx(e,t.tagName,!1),s=RE(e,t);let l=Wd(e,t);return SE.has(t.tagName)&&(l=l.filter(function(a){return typeof a=="string"?!Q1(a):!0})),Sx(e,s,o,t),Hd(s,l),e.ancestors.pop(),e.schema=r,e.create(t,o,s,n)}function _E(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}Ao(e,t.position)}function TE(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Ao(e,t.position)}function $E(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=zd,e.schema=i),e.ancestors.push(t);const o=t.name===null?e.Fragment:Cx(e,t.name,!0),s=ME(e,t),l=Wd(e,t);return Sx(e,s,o,t),Hd(s,l),e.ancestors.pop(),e.schema=r,e.create(t,o,s,n)}function IE(e,t,n){const r={};return Hd(r,Wd(e,t)),e.create(t,e.Fragment,r,n)}function LE(e,t){return t.value}function Sx(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Hd(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function AE(e,t,n){return r;function r(i,o,s,l){const u=Array.isArray(s.children)?n:t;return l?u(o,s,l):u(o,s)}}function OE(e,t){return n;function n(r,i,o,s){const l=Array.isArray(o.children),a=Bd(r);return t(i,o,s,l,{columnNumber:a?a.column-1:void 0,fileName:e,lineNumber:a?a.line:void 0},void 0)}}function RE(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&Ud.call(t.properties,i)){const o=PE(e,i,t.properties[i]);if(o){const[s,l]=o;e.tableCellAlignToStyle&&s==="align"&&typeof l=="string"&&CE.has(t.tagName)?r=l:n[s]=l}}if(r){const o=n.style||(n.style={});o[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function ME(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const o=r.data.estree.body[0];o.type;const s=o.expression;s.type;const l=s.properties[0];l.type,Object.assign(n,e.evaluater.evaluateExpression(l.argument))}else Ao(e,t.position);else{const{name:i}=r;let o;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const l=r.value.data.estree.body[0];l.type,o=e.evaluater.evaluateExpression(l.expression)}else Ao(e,t.position);else o=r.value===null?!0:r.value;n[i]=o}return n}function Wd(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:kE;for(;++r<t.children.length;){const o=t.children[r];let s;if(e.passKeys){const a=o.type==="element"?o.tagName:o.type==="mdxJsxFlowElement"||o.type==="mdxJsxTextElement"?o.name:void 0;if(a){const u=i.get(a)||0;s=a+"-"+u,i.set(a,u+1)}}const l=Ex(e,o,s);l!==void 0&&n.push(l)}return n}function PE(e,t,n){if(n==null||typeof n=="number"&&Number.isNaN(n))return;const r=iE(e.schema,t);return Array.isArray(n)&&(n=r.commaSeparated?G1(n):aE(n)),r.property==="style"?["style",typeof n=="object"?e.stylePropertyNameCase==="dom"?n:DE(n):FE(e,String(n))]:[e.elementAttributeNameCase==="react"&&r.space?tE[r.property]||r.property:r.attribute,n]}function FE(e,t){const n={};try{vE(t,function(r,i){if(r&&i){let o=r;o.slice(0,2)!=="--"&&(o=o.toLowerCase(),e.stylePropertyNameCase==="dom"&&(o.slice(0,4)==="-ms-"&&(o=o.slice(1)),o=o.replace(EE,UE))),n[o]=i}})}catch(r){if(e.ignoreInvalidStyle)return{};const i=r,o=new Hl("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:i,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw o.file=e.filePath||void 0,o.url=bx+"#cannot-parse-style-attribute",o}return n}function Cx(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const i=t.split(".");let o=-1,s;for(;++o<i.length;){const l=Jp(i[o])?{type:"Identifier",name:i[o]}:{type:"Literal",value:i[o]};s=s?{type:"MemberExpression",object:s,property:l,computed:!!(o&&l.type==="Literal"),optional:!1}:l}r=s}else r=Jp(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const i=r.value;return Ud.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);Ao(e)}function Ao(e,t){const n=new Hl("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=bx+"#cannot-handle-mdx-estrees-without-createevaluater",n}function DE(e){const t={};let n;for(n in e)Ud.call(e,n)&&(t[zE(n)]=e[n]);return t}function zE(e){if(e.slice(0,2)==="--")return e;let t=e.replace(bE,BE);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function BE(e){return"-"+e.toLowerCase()}function UE(e,t){return t.toUpperCase()}const Da={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},HE={};function Wl(e,t){const n=HE,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return Nx(e,r,i)}function Nx(e,t,n){if(WE(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return ah(e.children,t,n)}return Array.isArray(e)?ah(e,t,n):""}function ah(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=Nx(e[i],t,n);return r.join("")}function WE(e){return!!(e&&typeof e=="object")}const uh=document.createElement("i");function Vd(e){const t="&"+e+";";uh.innerHTML=t;const n=uh.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function mn(e,t,n,r){const i=e.length;let o=0,s;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,n=n>0?n:0,r.length<1e4)s=Array.from(r),s.unshift(t,n),e.splice(...s);else for(n&&e.splice(t,n);o<r.length;)s=r.slice(o,o+1e4),s.unshift(t,0),e.splice(...s),o+=1e4,t+=1e4}function Jt(e,t){return e.length>0?(mn(e,e.length,0,t),e):t}const ch={}.hasOwnProperty;function jx(e){const t={};let n=-1;for(;++n<e.length;)VE(t,e[n]);return t}function VE(e,t){let n;for(n in t){const i=(ch.call(e,n)?e[n]:void 0)||(e[n]={}),o=t[n];let s;if(o)for(s in o){ch.call(i,s)||(i[s]=[]);const l=o[s];GE(i[s],Array.isArray(l)?l:l?[l]:[])}}}function GE(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);mn(e,0,0,r)}function _x(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function gn(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const pt=mr(/[A-Za-z]/),ht=mr(/[\dA-Za-z]/),KE=mr(/[#-'*+\--9=?A-Z^-~]/);function yl(e){return e!==null&&(e<32||e===127)}const mc=mr(/\d/),qE=mr(/[\dA-Fa-f]/),Tx=mr(/[!-/:-@[-`{-~]/);function xe(e){return e!==null&&e<-2}function Pe(e){return e!==null&&(e<0||e===32)}function be(e){return e===-2||e===-1||e===32}const Uo=mr(new RegExp("\\p{P}|\\p{S}","u")),Fr=mr(/\s/);function mr(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function Ii(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const o=e.charCodeAt(n);let s="";if(o===37&&ht(e.charCodeAt(n+1))&&ht(e.charCodeAt(n+2)))i=2;else if(o<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(o))||(s=String.fromCharCode(o));else if(o>55295&&o<57344){const l=e.charCodeAt(n+1);o<56320&&l>56319&&l<57344?(s=String.fromCharCode(o,l),i=1):s="�"}else s=String.fromCharCode(o);s&&(t.push(e.slice(r,n),encodeURIComponent(s)),r=n+i+1,s=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function Ie(e,t,n,r){const i=r?r-1:1/0;let o=0;return s;function s(a){return be(a)?(e.enter(n),l(a)):t(a)}function l(a){return be(a)&&o++<i?(e.consume(a),l):(e.exit(n),t(a))}}function $x(e,t,n,r,i,o){let s=0;return l;function l(c){return be(c)?(e.enter(r),a(c)):u(c)}function a(c){return be(c)&&s<o?(e.consume(c),s++,a):(e.exit(r),u(c))}function u(c){return s>=i?t(c):n(c)}}const YE={tokenize:XE};function XE(e){const t=e.attempt(this.parser.constructs.contentInitial,r,i);let n;return t;function r(l){if(l===null){e.consume(l);return}return e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),Ie(e,t,"linePrefix")}function i(l){return e.enter("paragraph"),o(l)}function o(l){const a=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=a),n=a,s(l)}function s(l){if(l===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(l);return}return xe(l)?(e.consume(l),e.exit("chunkText"),o):(e.consume(l),s)}}let xl=class{constructor(){this.index=new Map,this.map=[]}add(t,n,r){dh(this,t,n,r,!1)}addBefore(t,n,r){dh(this,t,n,r,!0)}consume(t){if(this.map.sort(function(o,s){return o[0]-s[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push(t.slice()),t.length=0;let i=r.pop();for(;i;){for(const o of i)t.push(o);i=r.pop()}this.map.length=0,this.index.clear()}};function dh(e,t,n,r,i){if(n===0&&r.length===0)return;const o=e.index.get(t);if(o){o[1]+=n,i?(r.push(...o[2]),o[2]=r):o[2].push(...r);return}const s=[t,n,r];e.map.push(s),e.index.set(t,s)}const QE={tokenize:ZE},fh={tokenize:JE};function ZE(e){const t=this,n=[];let r=0,i,o,s;return l;function l(g){if(r<n.length){const k=n[r];return t.containerState=k[1],e.attempt(k[0].continuation,a,u)(g)}return u(g)}function a(g){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&m();const k=t.events.length;let C=k,E;for(;C--;)if(t.events[C][0]==="exit"&&t.events[C][1].type==="chunkFlow"){E=t.events[C][1].end;break}x(r);let A=k;for(;A<t.events.length;)t.events[A][1].end={...E},A++;const T=new xl;return T.add(C+1,0,t.events.slice(k)),T.add(k,A-k,[]),T.consume(t.events),u(g)}return l(g)}function u(g){if(r===n.length){if(!i)return h(g);if(i.currentConstruct&&i.currentConstruct.concrete)return y(g);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(fh,c,d)(g)}function c(g){return i&&m(),x(r),h(g)}function d(g){return t.parser.lazy[t.now().line]=r!==n.length,s=t.now().offset,y(g)}function h(g){return t.containerState={},e.attempt(fh,p,y)(g)}function p(g){return r++,n.push([t.currentConstruct,t.containerState]),h(g)}function y(g){if(g===null){i&&m(),x(0),e.consume(g);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:o}),v(g)}function v(g){if(g===null){w(e.exit("chunkFlow"),!0),x(0),e.consume(g);return}return xe(g)?(e.consume(g),w(e.exit("chunkFlow")),r=0,t.interrupt=void 0,l):(e.consume(g),v)}function w(g,k){const C=t.sliceStream(g);if(k&&C.push(null),g.previous=o,o&&(o.next=g),o=g,i.defineSkip(g.start),i.write(C),t.parser.lazy[g.start.line]){let E=i.events.length;for(;E--;)if(i.events[E][1].start.offset<s&&(!i.events[E][1].end||i.events[E][1].end.offset>s))return;const A=t.events.length;let T=A,L,b;for(;T--;)if(t.events[T][0]==="exit"&&t.events[T][1].type==="chunkFlow"){if(L){b=t.events[T][1].end;break}L=!0}for(x(r),E=A;E<t.events.length;)t.events[E][1].end={...b},E++;const R=new xl;R.add(T+1,0,t.events.slice(A)),R.add(A,E-A,[]),R.consume(t.events)}}function x(g){let k=n.length;for(;k-- >g;){const C=n[k];t.containerState=C[1],C[0].exit.call(t,e)}n.length=g}function m(){i.write([null]),o=void 0,i=void 0,t.containerState._closeFlow=void 0}}function JE(e,t,n){return Ie(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function cr(e){if(e===null||Pe(e)||Fr(e))return 1;if(Uo(e))return 2}function Vl(e,t,n){const r=[];let i=-1;for(;++i<e.length;){const o=e[i].resolveAll;o&&!r.includes(o)&&(t=o(t,n),r.push(o))}return t}const gc={name:"attention",resolveAll:eS,tokenize:tS};function eS(e,t){let n=-1,r;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){let i=n;for(;i--;)if(e[i][0]==="exit"&&e[i][1].type==="attentionSequence"&&e[i][1]._open&&t.sliceSerialize(e[i][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[i][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[i][1].end.offset-e[i][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;const o=e[i][1].end.offset-e[i][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1,s={...e[i][1].end},l={...e[n][1].start};ph(s,-o),ph(l,o);const a={type:o>1?"strongSequence":"emphasisSequence",start:s,end:{...e[i][1].end}},u={type:o>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:l},c={type:o>1?"strongText":"emphasisText",start:{...e[i][1].end},end:{...e[n][1].start}},d={type:o>1?"strong":"emphasis",start:{...a.start},end:{...u.end}};e[i][1].end={...a.start},e[n][1].start={...u.end},r=[],e[i][1].end.offset-e[i][1].start.offset&&(r=Jt(r,[["enter",e[i][1],t],["exit",e[i][1],t]])),r=Jt(r,[["enter",d,t],["enter",a,t],["exit",a,t],["enter",c,t]]),r=Jt(r,Vl(t.parser.constructs.insideSpan.null,e.slice(i+1,n),t)),r=Jt(r,[["exit",c,t],["enter",u,t],["exit",u,t],["exit",d,t]]);let h=0;e[n][1].end.offset-e[n][1].start.offset&&(h=2,r=Jt(r,[["enter",e[n][1],t],["exit",e[n][1],t]])),mn(e,i-1,n-i+3,r),n=i+r.length-h-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function tS(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=cr(r);let o;return s;function s(a){return o=a,e.enter("attentionSequence"),l(a)}function l(a){if(a===o)return e.consume(a),l;const u=e.exit("attentionSequence"),c=cr(a),d=!c||c===2&&i||n.includes(a)&&a!==42&&a!==95,h=!i||i===2&&c||n.includes(r)&&r!==42&&r!==95;return u._open=!!(o===42?d:d&&(i||!h)),u._close=!!(o===42?h:h&&(c||!d)),t(a)}}function ph(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const nS={name:"autolink",tokenize:rS};function rS(e,t,n){let r=0;return i;function i(p){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),o}function o(p){return pt(p)?(e.consume(p),s):p===64?n(p):u(p)}function s(p){return p===43||p===45||p===46||ht(p)?(r=1,l(p)):u(p)}function l(p){return p===58?(e.consume(p),r=0,a):(p===43||p===45||p===46||ht(p))&&r++<32?(e.consume(p),l):(r=0,u(p))}function a(p){return p===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.exit("autolink"),t):p===null||p===32||p===60||yl(p)?n(p):(e.consume(p),a)}function u(p){return p===64?(e.consume(p),c):KE(p)?(e.consume(p),u):n(p)}function c(p){return ht(p)?d(p):n(p)}function d(p){return p===46?(e.consume(p),r=0,c):p===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.exit("autolink"),t):h(p)}function h(p){if((p===45||ht(p))&&r++<63){const y=p===45?h:d;return e.consume(p),y}return n(p)}}const Ho={partial:!0,tokenize:iS};function iS(e,t,n){return r;function r(o){return be(o)?Ie(e,i,"linePrefix")(o):i(o)}function i(o){return o===null||xe(o)?t(o):n(o)}}const Ix={continuation:{tokenize:sS},exit:lS,name:"blockQuote",tokenize:oS};function oS(e,t,n){const r=this;return i;function i(s){if(s===62){const l=r.containerState;return l.open||(e.enter("blockQuote",{_container:!0}),l.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(s),e.exit("blockQuoteMarker"),o}return n(s)}function o(s){return be(s)?(e.enter("blockQuotePrefixWhitespace"),e.consume(s),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(s))}}function sS(e,t,n){const r=this;return i;function i(s){return be(s)?Ie(e,o,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s):o(s)}function o(s){return e.attempt(Ix,t,n)(s)}}function lS(e){e.exit("blockQuote")}const Lx={name:"characterEscape",tokenize:aS};function aS(e,t,n){return r;function r(o){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(o),e.exit("escapeMarker"),i}function i(o){return Tx(o)?(e.enter("characterEscapeValue"),e.consume(o),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(o)}}const Ax={name:"characterReference",tokenize:uS};function uS(e,t,n){const r=this;let i=0,o,s;return l;function l(d){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(d),e.exit("characterReferenceMarker"),a}function a(d){return d===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(d),e.exit("characterReferenceMarkerNumeric"),u):(e.enter("characterReferenceValue"),o=31,s=ht,c(d))}function u(d){return d===88||d===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(d),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),o=6,s=qE,c):(e.enter("characterReferenceValue"),o=7,s=mc,c(d))}function c(d){if(d===59&&i){const h=e.exit("characterReferenceValue");return s===ht&&!Vd(r.sliceSerialize(h))?n(d):(e.enter("characterReferenceMarker"),e.consume(d),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return s(d)&&i++<o?(e.consume(d),c):n(d)}}const yc={partial:!0,tokenize:cS};function cS(e,t,n){const r=this;return i;function i(s){return s===null?n(s):(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),o)}function o(s){return r.parser.lazy[r.now().line]?n(s):t(s)}}const hh={concrete:!0,name:"codeFenced",tokenize:dS};function dS(e,t,n){const r=this,i={partial:!0,tokenize:C};let o=0,s=0,l;return a;function a(E){return u(E)}function u(E){const A=r.events[r.events.length-1];return o=A&&A[1].type==="linePrefix"?A[2].sliceSerialize(A[1],!0).length:0,l=E,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),c(E)}function c(E){return E===l?(s++,e.consume(E),c):s<3?n(E):(e.exit("codeFencedFenceSequence"),be(E)?Ie(e,d,"whitespace")(E):d(E))}function d(E){return E===null||xe(E)?(e.exit("codeFencedFence"),r.interrupt?t(E):e.check(yc,v,k)(E)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),h(E))}function h(E){return E===null||xe(E)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),d(E)):be(E)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Ie(e,p,"whitespace")(E)):E===96&&E===l?n(E):(e.consume(E),h)}function p(E){return E===null||xe(E)?d(E):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),y(E))}function y(E){return E===null||xe(E)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),d(E)):E===96&&E===l?n(E):(e.consume(E),y)}function v(E){return e.attempt(i,k,w)(E)}function w(E){return e.enter("lineEnding"),e.consume(E),e.exit("lineEnding"),x}function x(E){return o>0&&be(E)?Ie(e,m,"linePrefix",o+1)(E):m(E)}function m(E){return E===null||xe(E)?e.check(yc,v,k)(E):(e.enter("codeFlowValue"),g(E))}function g(E){return E===null||xe(E)?(e.exit("codeFlowValue"),m(E)):(e.consume(E),g)}function k(E){return e.exit("codeFenced"),t(E)}function C(E,A,T){let L=0;return b;function b(z){return E.enter("lineEnding"),E.consume(z),E.exit("lineEnding"),R}function R(z){return E.enter("codeFencedFence"),be(z)?Ie(E,$,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(z):$(z)}function $(z){return z===l?(E.enter("codeFencedFenceSequence"),P(z)):T(z)}function P(z){return z===l?(L++,E.consume(z),P):L>=s?(E.exit("codeFencedFenceSequence"),be(z)?Ie(E,I,"whitespace")(z):I(z)):T(z)}function I(z){return z===null||xe(z)?(E.exit("codeFencedFence"),A(z)):T(z)}}}const za={name:"codeIndented",tokenize:pS},fS={partial:!0,tokenize:hS};function pS(e,t,n){return r;function r(l){return e.enter("codeIndented"),$x(e,i,n,"linePrefix",4,4)(l)}function i(l){return l===null?s(l):xe(l)?e.attempt(fS,i,s)(l):(e.enter("codeFlowValue"),o(l))}function o(l){return l===null||xe(l)?(e.exit("codeFlowValue"),i(l)):(e.consume(l),o)}function s(l){return e.exit("codeIndented"),t(l)}}function hS(e,t,n){const r=this;return i;function i(s){return r.parser.lazy[r.now().line]?n(s):xe(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),i):$x(e,t,o,"linePrefix",4,4)(s)}function o(s){return xe(s)?i(s):n(s)}}const mS={name:"codeText",previous:yS,resolve:gS,tokenize:xS};function gS(e){let t=e.length-4,n=3,r,i;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(i=r):(r===t||e[r][1].type==="lineEnding")&&(e[i][1].type="codeTextData",r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function yS(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function xS(e,t,n){let r=0,i,o;return s;function s(d){return e.enter("codeText"),e.enter("codeTextSequence"),l(d)}function l(d){return d===96?(e.consume(d),r++,l):(e.exit("codeTextSequence"),a(d))}function a(d){return d===null?n(d):d===32?(e.enter("space"),e.consume(d),e.exit("space"),a):d===96?(o=e.enter("codeTextSequence"),i=0,c(d)):xe(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),a):(e.enter("codeTextData"),u(d))}function u(d){return d===null||d===32||d===96||xe(d)?(e.exit("codeTextData"),a(d)):(e.consume(d),u)}function c(d){return d===96?(e.consume(d),i++,c):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(d)):(o.type="codeTextData",u(d))}}class vS{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const r=n??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const i=n||0;this.setCursor(Math.trunc(t));const o=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&Wi(this.left,r),o.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),Wi(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Wi(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);Wi(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Wi(this.left,n.reverse())}}}function Wi(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function Ox(e){const t={};let n=-1,r,i,o,s,l,a,u;const c=new vS(e);for(;++n<c.length;){for(;n in t;)n=t[n];if(r=c.get(n),n&&r[1].type==="chunkFlow"&&c.get(n-1)[1].type==="listItemPrefix"&&(a=r[1]._tokenizer.events,o=0,o<a.length&&a[o][1].type==="lineEndingBlank"&&(o+=2),o<a.length&&a[o][1].type==="content"))for(;++o<a.length&&a[o][1].type!=="content";)a[o][1].type==="chunkText"&&(a[o][1]._isInFirstContentOfListItem=!0,o++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,wS(c,n)),n=t[n],u=!0);else if(r[1]._container){for(o=n,i=void 0;o--;)if(s=c.get(o),s[1].type==="lineEnding"||s[1].type==="lineEndingBlank")s[0]==="enter"&&(i&&(c.get(i)[1].type="lineEndingBlank"),s[1].type="lineEnding",i=o);else if(!(s[1].type==="linePrefix"||s[1].type==="listItemIndent"))break;i&&(r[1].end={...c.get(i)[1].start},l=c.slice(i,n),l.unshift(r),c.splice(i,n-i+1,l))}}return mn(e,0,Number.POSITIVE_INFINITY,c.slice(0)),!u}function wS(e,t){const n=e.get(t)[1],r=e.get(t)[2];let i=t-1;const o=[];let s=n._tokenizer;s||(s=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(s._contentTypeTextTrailing=!0));const l=s.events,a=[],u={};let c,d,h=-1,p=n,y=0,v=0;const w=[v];for(;p;){for(;e.get(++i)[1]!==p;);o.push(i),p._tokenizer||(c=r.sliceStream(p),p.next||c.push(null),d&&s.defineSkip(p.start),p._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=!0),s.write(c),p._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=void 0)),d=p,p=p.next}for(p=n;++h<l.length;)l[h][0]==="exit"&&l[h-1][0]==="enter"&&l[h][1].type===l[h-1][1].type&&l[h][1].start.line!==l[h][1].end.line&&(v=h+1,w.push(v),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(s.events=[],p?(p._tokenizer=void 0,p.previous=void 0):w.pop(),h=w.length;h--;){const x=l.slice(w[h],w[h+1]),m=o.pop();a.push([m,m+x.length-1]),e.splice(m,2,x)}for(a.reverse(),h=-1;++h<a.length;)u[y+a[h][0]]=y+a[h][1],y+=a[h][1]-a[h][0]-1;return u}const kS={resolve:ES,tokenize:SS},bS={partial:!0,tokenize:CS};function ES(e){return Ox(e),e}function SS(e,t){let n;return r;function r(l){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),i(l)}function i(l){return l===null?o(l):xe(l)?e.check(bS,s,o)(l):(e.consume(l),i)}function o(l){return e.exit("chunkContent"),e.exit("content"),t(l)}function s(l){return e.consume(l),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function CS(e,t,n){const r=this;return i;function i(s){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),Ie(e,o,"linePrefix")}function o(s){if(s===null||xe(s))return n(s);const l=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&l&&l[1].type==="linePrefix"&&l[2].sliceSerialize(l[1],!0).length>=4?t(s):e.interrupt(r.parser.constructs.flow,n,t)(s)}}function Rx(e,t,n,r,i,o,s,l,a){const u=a||Number.POSITIVE_INFINITY;let c=0;return d;function d(x){return x===60?(e.enter(r),e.enter(i),e.enter(o),e.consume(x),e.exit(o),h):x===null||x===32||x===41||yl(x)?n(x):(e.enter(r),e.enter(s),e.enter(l),e.enter("chunkString",{contentType:"string"}),v(x))}function h(x){return x===62?(e.enter(o),e.consume(x),e.exit(o),e.exit(i),e.exit(r),t):(e.enter(l),e.enter("chunkString",{contentType:"string"}),p(x))}function p(x){return x===62?(e.exit("chunkString"),e.exit(l),h(x)):x===null||x===60||xe(x)?n(x):(e.consume(x),x===92?y:p)}function y(x){return x===60||x===62||x===92?(e.consume(x),p):p(x)}function v(x){return!c&&(x===null||x===41||Pe(x))?(e.exit("chunkString"),e.exit(l),e.exit(s),e.exit(r),t(x)):c<u&&x===40?(e.consume(x),c++,v):x===41?(e.consume(x),c--,v):x===null||x===32||x===40||yl(x)?n(x):(e.consume(x),x===92?w:v)}function w(x){return x===40||x===41||x===92?(e.consume(x),v):v(x)}}function Mx(e,t,n,r,i,o){const s=this;let l=0,a;return u;function u(p){return e.enter(r),e.enter(i),e.consume(p),e.exit(i),e.enter(o),c}function c(p){return l>999||p===null||p===91||p===93&&!a||p===94&&!l&&"_hiddenFootnoteSupport"in s.parser.constructs?n(p):p===93?(e.exit(o),e.enter(i),e.consume(p),e.exit(i),e.exit(r),t):xe(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),c):(e.enter("chunkString",{contentType:"string"}),d(p))}function d(p){return p===null||p===91||p===93||xe(p)||l++>999?(e.exit("chunkString"),c(p)):(e.consume(p),a||(a=!be(p)),p===92?h:d)}function h(p){return p===91||p===92||p===93?(e.consume(p),l++,d):d(p)}}function Px(e,t,n,r,i,o){let s;return l;function l(h){return h===34||h===39||h===40?(e.enter(r),e.enter(i),e.consume(h),e.exit(i),s=h===40?41:h,a):n(h)}function a(h){return h===s?(e.enter(i),e.consume(h),e.exit(i),e.exit(r),t):(e.enter(o),u(h))}function u(h){return h===s?(e.exit(o),a(s)):h===null?n(h):xe(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),Ie(e,u,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),c(h))}function c(h){return h===s||h===null||xe(h)?(e.exit("chunkString"),u(h)):(e.consume(h),h===92?d:c)}function d(h){return h===s||h===92?(e.consume(h),c):c(h)}}function uo(e,t){let n;return r;function r(i){return xe(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):be(i)?Ie(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const NS={name:"definition",tokenize:_S},jS={partial:!0,tokenize:TS};function _S(e,t,n){const r=this;let i;return o;function o(p){return e.enter("definition"),s(p)}function s(p){return Mx.call(r,e,l,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(p)}function l(p){return i=gn(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),p===58?(e.enter("definitionMarker"),e.consume(p),e.exit("definitionMarker"),a):n(p)}function a(p){return Pe(p)?uo(e,u)(p):u(p)}function u(p){return Rx(e,c,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(p)}function c(p){return e.attempt(jS,d,d)(p)}function d(p){return be(p)?Ie(e,h,"whitespace")(p):h(p)}function h(p){return p===null||xe(p)?(e.exit("definition"),r.parser.defined.push(i),t(p)):n(p)}}function TS(e,t,n){return r;function r(l){return Pe(l)?uo(e,i)(l):n(l)}function i(l){return Px(e,o,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(l)}function o(l){return be(l)?Ie(e,s,"whitespace")(l):s(l)}function s(l){return l===null||xe(l)?t(l):n(l)}}const $S={name:"hardBreakEscape",tokenize:IS};function IS(e,t,n){return r;function r(o){return e.enter("hardBreakEscape"),e.consume(o),i}function i(o){return xe(o)?(e.exit("hardBreakEscape"),t(o)):n(o)}}const LS={name:"headingAtx",resolve:AS,tokenize:OS};function AS(e,t){let n=e.length-2,r=3;if(e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r){const i={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},o={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"};mn(e,r,n-r+1,[["enter",i,t],["enter",o,t],["exit",o,t],["exit",i,t]])}return e}function OS(e,t,n){let r=0;return i;function i(c){return e.enter("atxHeading"),o(c)}function o(c){return e.enter("atxHeadingSequence"),s(c)}function s(c){return c===35&&r++<6?(e.consume(c),s):c===null||Pe(c)?(e.exit("atxHeadingSequence"),l(c)):n(c)}function l(c){return c===35?(e.enter("atxHeadingSequence"),a(c)):c===null||xe(c)?(e.exit("atxHeading"),t(c)):be(c)?Ie(e,l,"whitespace")(c):(e.enter("atxHeadingText"),u(c))}function a(c){return c===35?(e.consume(c),a):(e.exit("atxHeadingSequence"),l(c))}function u(c){return c===null||c===35||Pe(c)?(e.exit("atxHeadingText"),l(c)):(e.consume(c),u)}}const Fx=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],xc=["pre","script","style","textarea"],RS={concrete:!0,name:"htmlFlow",resolveTo:PS,tokenize:FS},MS={partial:!0,tokenize:DS};function PS(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function FS(e,t,n){const r=this;let i,o,s,l,a;return u;function u(_){return c(_)}function c(_){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(_),d}function d(_){return _===33?(e.consume(_),h):_===47?(e.consume(_),o=!0,v):_===63?(e.consume(_),i=3,r.interrupt?t:S):pt(_)?(e.consume(_),s=String.fromCharCode(_),w):n(_)}function h(_){return _===45?(e.consume(_),i=2,p):_===91?(e.consume(_),i=5,l=0,y):pt(_)?(e.consume(_),i=4,r.interrupt?t:S):n(_)}function p(_){return _===45?(e.consume(_),r.interrupt?t:S):n(_)}function y(_){const O="CDATA[";return _===O.charCodeAt(l++)?(e.consume(_),l===O.length?r.interrupt?t:$:y):n(_)}function v(_){return pt(_)?(e.consume(_),s=String.fromCharCode(_),w):n(_)}function w(_){if(_===null||_===47||_===62||Pe(_)){const O=_===47,N=s.toLowerCase();return!O&&!o&&xc.includes(N)?(i=1,r.interrupt?t(_):$(_)):Fx.includes(s.toLowerCase())?(i=6,O?(e.consume(_),x):r.interrupt?t(_):$(_)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(_):o?m(_):g(_))}return _===45||ht(_)?(e.consume(_),s+=String.fromCharCode(_),w):n(_)}function x(_){return _===62?(e.consume(_),r.interrupt?t:$):n(_)}function m(_){return be(_)?(e.consume(_),m):b(_)}function g(_){return _===47?(e.consume(_),b):_===58||_===95||pt(_)?(e.consume(_),k):be(_)?(e.consume(_),g):b(_)}function k(_){return _===45||_===46||_===58||_===95||ht(_)?(e.consume(_),k):C(_)}function C(_){return _===61?(e.consume(_),E):be(_)?(e.consume(_),C):g(_)}function E(_){return _===null||_===60||_===61||_===62||_===96?n(_):_===34||_===39?(e.consume(_),a=_,A):be(_)?(e.consume(_),E):T(_)}function A(_){return _===a?(e.consume(_),a=null,L):_===null||xe(_)?n(_):(e.consume(_),A)}function T(_){return _===null||_===34||_===39||_===47||_===60||_===61||_===62||_===96||Pe(_)?C(_):(e.consume(_),T)}function L(_){return _===47||_===62||be(_)?g(_):n(_)}function b(_){return _===62?(e.consume(_),R):n(_)}function R(_){return _===null||xe(_)?$(_):be(_)?(e.consume(_),R):n(_)}function $(_){return _===45&&i===2?(e.consume(_),B):_===60&&i===1?(e.consume(_),W):_===62&&i===4?(e.consume(_),X):_===63&&i===3?(e.consume(_),S):_===93&&i===5?(e.consume(_),K):xe(_)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(MS,Z,P)(_)):_===null||xe(_)?(e.exit("htmlFlowData"),P(_)):(e.consume(_),$)}function P(_){return e.check(yc,I,Z)(_)}function I(_){return e.enter("lineEnding"),e.consume(_),e.exit("lineEnding"),z}function z(_){return _===null||xe(_)?P(_):(e.enter("htmlFlowData"),$(_))}function B(_){return _===45?(e.consume(_),S):$(_)}function W(_){return _===47?(e.consume(_),s="",M):$(_)}function M(_){if(_===62){const O=s.toLowerCase();return xc.includes(O)?(e.consume(_),X):$(_)}return pt(_)&&s.length<8?(e.consume(_),s+=String.fromCharCode(_),M):$(_)}function K(_){return _===93?(e.consume(_),S):$(_)}function S(_){return _===62?(e.consume(_),X):_===45&&i===2?(e.consume(_),S):$(_)}function X(_){return _===null||xe(_)?(e.exit("htmlFlowData"),Z(_)):(e.consume(_),X)}function Z(_){return e.exit("htmlFlow"),t(_)}}function DS(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(Ho,t,n)}}const zS={name:"htmlText",tokenize:BS};function BS(e,t,n){const r=this;let i,o,s;return l;function l(S){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(S),a}function a(S){return S===33?(e.consume(S),u):S===47?(e.consume(S),C):S===63?(e.consume(S),g):pt(S)?(e.consume(S),T):n(S)}function u(S){return S===45?(e.consume(S),c):S===91?(e.consume(S),o=0,y):pt(S)?(e.consume(S),m):n(S)}function c(S){return S===45?(e.consume(S),p):n(S)}function d(S){return S===null?n(S):S===45?(e.consume(S),h):xe(S)?(s=d,W(S)):(e.consume(S),d)}function h(S){return S===45?(e.consume(S),p):d(S)}function p(S){return S===62?B(S):S===45?h(S):d(S)}function y(S){const X="CDATA[";return S===X.charCodeAt(o++)?(e.consume(S),o===X.length?v:y):n(S)}function v(S){return S===null?n(S):S===93?(e.consume(S),w):xe(S)?(s=v,W(S)):(e.consume(S),v)}function w(S){return S===93?(e.consume(S),x):v(S)}function x(S){return S===62?B(S):S===93?(e.consume(S),x):v(S)}function m(S){return S===null||S===62?B(S):xe(S)?(s=m,W(S)):(e.consume(S),m)}function g(S){return S===null?n(S):S===63?(e.consume(S),k):xe(S)?(s=g,W(S)):(e.consume(S),g)}function k(S){return S===62?B(S):g(S)}function C(S){return pt(S)?(e.consume(S),E):n(S)}function E(S){return S===45||ht(S)?(e.consume(S),E):A(S)}function A(S){return xe(S)?(s=A,W(S)):be(S)?(e.consume(S),A):B(S)}function T(S){return S===45||ht(S)?(e.consume(S),T):S===47||S===62||Pe(S)?L(S):n(S)}function L(S){return S===47?(e.consume(S),B):S===58||S===95||pt(S)?(e.consume(S),b):xe(S)?(s=L,W(S)):be(S)?(e.consume(S),L):B(S)}function b(S){return S===45||S===46||S===58||S===95||ht(S)?(e.consume(S),b):R(S)}function R(S){return S===61?(e.consume(S),$):xe(S)?(s=R,W(S)):be(S)?(e.consume(S),R):L(S)}function $(S){return S===null||S===60||S===61||S===62||S===96?n(S):S===34||S===39?(e.consume(S),i=S,P):xe(S)?(s=$,W(S)):be(S)?(e.consume(S),$):(e.consume(S),I)}function P(S){return S===i?(e.consume(S),i=void 0,z):S===null?n(S):xe(S)?(s=P,W(S)):(e.consume(S),P)}function I(S){return S===null||S===34||S===39||S===60||S===61||S===96?n(S):S===47||S===62||Pe(S)?L(S):(e.consume(S),I)}function z(S){return S===47||S===62||Pe(S)?L(S):n(S)}function B(S){return S===62?(e.consume(S),e.exit("htmlTextData"),e.exit("htmlText"),t):n(S)}function W(S){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(S),e.exit("lineEnding"),M}function M(S){return be(S)?Ie(e,K,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(S):K(S)}function K(S){return e.enter("htmlTextData"),s(S)}}const Gd={name:"labelEnd",resolveAll:VS,resolveTo:GS,tokenize:KS},US={tokenize:qS},HS={tokenize:YS},WS={tokenize:XS};function VS(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const i=r.type==="labelImage"?4:2;r.type="data",t+=i}}return e.length!==n.length&&mn(e,0,e.length,n),e}function GS(e,t){let n=e.length,r=0,i,o,s;for(;n--;){const c=e[n][1];if(i){if(c.type==="link"||c.type==="labelLink"&&c._inactive)break;e[n][0]==="enter"&&c.type==="labelLink"&&(c._inactive=!0)}else if(o){if(e[n][0]==="enter"&&(c.type==="labelImage"||c.type==="labelLink")&&!c._balanced&&(i=n,c.type!=="labelLink")){r=2;break}}else c.type==="labelEnd"&&(o=n)}const l={type:e[i][1].type==="labelLink"?"link":"image",start:{...e[i][1].start},end:{...e[e.length-1][1].end}},a={type:"label",start:{...e[i][1].start},end:{...e[o][1].end}},u={type:"labelText",start:{...e[i+r+2][1].end},end:{...e[o-2][1].start}};return s=[["enter",l,t],["enter",a,t]],s=Jt(s,e.slice(i+1,i+r+3)),s=Jt(s,[["enter",u,t]]),s=Jt(s,Vl(t.parser.constructs.insideSpan.null,e.slice(i+r+4,o-3),t)),s=Jt(s,[["exit",u,t],e[o-2],e[o-1],["exit",a,t]]),s=Jt(s,e.slice(o+1)),s=Jt(s,[["exit",l,t]]),mn(e,i,e.length,s),e}function KS(e,t,n){const r=this,i=r._labelStarts;let o,s;if(i){for(;i.length>0&&i[i.length-1]._balanced;)i.pop();o=i[i.length-1]}return l;function l(h){return o?o._inactive?d(h):(s=r.parser.defined.includes(gn(r.sliceSerialize({start:o.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(h),e.exit("labelMarker"),e.exit("labelEnd"),a):n(h)}function a(h){return h===40?e.attempt(US,c,s?c:d)(h):h===91?e.attempt(HS,c,s?u:d)(h):s?c(h):d(h)}function u(h){return e.attempt(WS,c,d)(h)}function c(h){return i.pop(),t(h)}function d(h){return o._balanced=!0,n(h)}}function qS(e,t,n){return r;function r(d){return e.enter("resource"),e.enter("resourceMarker"),e.consume(d),e.exit("resourceMarker"),i}function i(d){return Pe(d)?uo(e,o)(d):o(d)}function o(d){return d===41?c(d):Rx(e,s,l,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(d)}function s(d){return Pe(d)?uo(e,a)(d):c(d)}function l(d){return n(d)}function a(d){return d===34||d===39||d===40?Px(e,u,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(d):c(d)}function u(d){return Pe(d)?uo(e,c)(d):c(d)}function c(d){return d===41?(e.enter("resourceMarker"),e.consume(d),e.exit("resourceMarker"),e.exit("resource"),t):n(d)}}function YS(e,t,n){const r=this;return i;function i(l){return Mx.call(r,e,o,s,"reference","referenceMarker","referenceString")(l)}function o(l){return r.parser.defined.includes(gn(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(l):n(l)}function s(l){return n(l)}}function XS(e,t,n){return r;function r(o){return e.enter("reference"),e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),i}function i(o){return o===93?(e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),e.exit("reference"),t):n(o)}}const QS={name:"labelStartImage",resolveAll:Gd.resolveAll,tokenize:ZS};function ZS(e,t,n){const r=this;let i;return o;function o(a){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(a),e.exit("labelImageMarker"),s}function s(a){return a===91?(e.enter("labelMarker"),e.consume(a),e.exit("labelMarker"),i=e.exit("labelImage"),l):n(a)}function l(a){return a===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(a):(r._labelStarts=r._labelStarts||[],r._labelStarts.push(i),t(a))}}const JS={name:"labelStartLink",resolveAll:Gd.resolveAll,tokenize:eC};function eC(e,t,n){const r=this;let i;return o;function o(l){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(l),e.exit("labelMarker"),i=e.exit("labelLink"),s}function s(l){return l===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(l):(r._labelStarts=r._labelStarts||[],r._labelStarts.push(i),t(l))}}const Ba={name:"lineEnding",tokenize:tC};function tC(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),Ie(e,t,"linePrefix")}}const Ps={name:"thematicBreak",tokenize:nC};function nC(e,t,n){let r=0,i;return o;function o(u){return e.enter("thematicBreak"),s(u)}function s(u){return i=u,l(u)}function l(u){return u===i?(e.enter("thematicBreakSequence"),a(u)):r>=3&&(u===null||xe(u))?(e.exit("thematicBreak"),t(u)):n(u)}function a(u){return u===i?(e.consume(u),r++,a):(e.exit("thematicBreakSequence"),be(u)?Ie(e,l,"whitespace")(u):l(u))}}const Tt={continuation:{tokenize:sC},exit:aC,name:"list",tokenize:oC},rC={partial:!0,tokenize:uC},iC={partial:!0,tokenize:lC};function oC(e,t,n){const r=this,i=r.events[r.events.length-1];let o=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,s=0;return l;function l(p){const y=r.containerState.type||(p===42||p===43||p===45?"listUnordered":"listOrdered");if(y==="listUnordered"?!r.containerState.marker||p===r.containerState.marker:mc(p)){if(r.containerState.type||(r.containerState.type=y,e.enter(y,{_container:!0})),y==="listUnordered")return e.enter("listItemPrefix"),p===42||p===45?e.check(Ps,n,u)(p):u(p);if(!r.interrupt||p===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),a(p)}return n(p)}function a(p){return mc(p)&&++s<10?(e.consume(p),a):(!r.interrupt||s<2)&&(r.containerState.marker?p===r.containerState.marker:p===41||p===46)?(e.exit("listItemValue"),u(p)):n(p)}function u(p){return e.enter("listItemMarker"),e.consume(p),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||p,e.check(Ho,r.interrupt?n:c,e.attempt(rC,h,d))}function c(p){return r.containerState.initialBlankLine=!0,o++,h(p)}function d(p){return be(p)?(e.enter("listItemPrefixWhitespace"),e.consume(p),e.exit("listItemPrefixWhitespace"),h):n(p)}function h(p){return r.containerState.size=o+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(p)}}function sC(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(Ho,i,o);function i(l){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Ie(e,t,"listItemIndent",r.containerState.size+1)(l)}function o(l){return r.containerState.furtherBlankLines||!be(l)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,s(l)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(iC,t,s)(l))}function s(l){return r.containerState._closeFlow=!0,r.interrupt=void 0,Ie(e,e.attempt(Tt,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l)}}function lC(e,t,n){const r=this;return Ie(e,i,"listItemIndent",r.containerState.size+1);function i(o){const s=r.events[r.events.length-1];return s&&s[1].type==="listItemIndent"&&s[2].sliceSerialize(s[1],!0).length===r.containerState.size?t(o):n(o)}}function aC(e){e.exit(this.containerState.type)}function uC(e,t,n){const r=this;return Ie(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(o){const s=r.events[r.events.length-1];return!be(o)&&s&&s[1].type==="listItemPrefixWhitespace"?t(o):n(o)}}const mh={name:"setextUnderline",resolveTo:cC,tokenize:dC};function cC(e,t){const n=new xl;let r=e.length,i,o,s;for(;r--;)if(e[r][0]==="enter"){if(e[r][1].type==="content"){i=r;break}e[r][1].type==="paragraph"&&(o=r)}else e[r][1].type==="content"&&n.add(r,1,[]),!s&&e[r][1].type==="definition"&&(s=r);const l={type:"setextHeading",start:{...e[i][1].start},end:{...e[e.length-1][1].end}};return e[o][1].type="setextHeadingText",s?(n.add(o,0,[["enter",l,t]]),n.add(s+1,0,[["exit",e[i][1],t]]),e[i][1].end={...e[s][1].end}):e[i][1]=l,n.add(e.length,0,[["exit",l,t]]),n.consume(e),e}function dC(e,t,n){const r=this;let i;return o;function o(u){let c=r.events.length,d;for(;c--;)if(r.events[c][1].type!=="lineEnding"&&r.events[c][1].type!=="linePrefix"&&r.events[c][1].type!=="content"){d=r.events[c][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||d)?(e.enter("setextHeadingLine"),i=u,s(u)):n(u)}function s(u){return e.enter("setextHeadingLineSequence"),l(u)}function l(u){return u===i?(e.consume(u),l):(e.exit("setextHeadingLineSequence"),be(u)?Ie(e,a,"lineSuffix")(u):a(u))}function a(u){return u===null||xe(u)?(e.exit("setextHeadingLine"),t(u)):n(u)}}const fC={tokenize:pC};function pC(e){const t=this,n=e.attempt(Ho,r,e.attempt(this.parser.constructs.flowInitial,i,Ie(e,e.attempt(this.parser.constructs.flow,i,e.attempt(kS,i)),"linePrefix")));return n;function r(o){if(o===null){e.consume(o);return}return e.enter("lineEndingBlank"),e.consume(o),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const hC={resolveAll:zx()},mC=Dx("string"),gC=Dx("text");function Dx(e){return{resolveAll:zx(e==="text"?yC:void 0),tokenize:t};function t(n){const r=this,i=this.parser.constructs[e],o=n.attempt(i,s,l);return s;function s(c){return u(c)?o(c):l(c)}function l(c){if(c===null){n.consume(c);return}return n.enter("data"),n.consume(c),a}function a(c){return u(c)?(n.exit("data"),o(c)):(n.consume(c),a)}function u(c){if(c===null)return!0;const d=i[c];let h=-1;if(d)for(;++h<d.length;){const p=d[h];if(!p.previous||p.previous.call(r,r.previous))return!0}return!1}}}function zx(e){return t;function t(n,r){let i=-1,o;for(;++i<=n.length;)o===void 0?n[i]&&n[i][1].type==="data"&&(o=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==o+2&&(n[o][1].end=n[i-1][1].end,n.splice(o+2,i-o-2),i=o+2),o=void 0);return e?e(n,r):n}}function yC(e,t){const n=new xl;let r=0;for(;++r<=e.length;)if((r===e.length||e[r][1].type==="lineEnding")&&e[r-1][1].type==="data"){const i=e[r-1][1],o=t.sliceStream(i);let s=o.length,l=-1,a=0,u;for(;s--;){const c=o[s];if(typeof c=="string"){for(l=c.length;c.charCodeAt(l-1)===32;)a++,l--;if(l)break;l=-1}else if(c===-2)u=!0,a++;else if(c!==-1){s++;break}}if(t._contentTypeTextTrailing&&r===e.length&&(a=0),a){const c={type:r===e.length||u||a<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:s?l:i.start._bufferIndex+l,_index:i.start._index+s,line:i.end.line,column:i.end.column-a,offset:i.end.offset-a},end:{...i.end}};i.end={...c.start},i.start.offset===i.end.offset?Object.assign(i,c):n.add(r,0,[["enter",c,t],["exit",c,t]])}r++}return n.consume(e),e}const xC={42:Tt,43:Tt,45:Tt,48:Tt,49:Tt,50:Tt,51:Tt,52:Tt,53:Tt,54:Tt,55:Tt,56:Tt,57:Tt,62:Ix},vC={91:NS},wC={[-2]:za,[-1]:za,32:za},kC={35:LS,42:Ps,45:[mh,Ps],60:RS,61:mh,95:Ps,96:hh,126:hh},bC={38:Ax,92:Lx},EC={[-5]:Ba,[-4]:Ba,[-3]:Ba,33:QS,38:Ax,42:gc,60:[nS,zS],91:JS,92:[$S,Lx],93:Gd,95:gc,96:mS},SC={null:[gc,hC]},CC={null:[42,95]},NC={null:[]},jC=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:CC,contentInitial:vC,disable:NC,document:xC,flow:kC,flowInitial:wC,insideSpan:SC,string:bC,text:EC},Symbol.toStringTag,{value:"Module"}));function _C(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const i={},o=[];let s=[],l=[];const a={attempt:A(C),check:A(E),consume:m,enter:g,exit:k,interrupt:A(E,{interrupt:!0})},u={code:null,containerState:{},defineSkip:v,events:[],now:y,parser:e,previous:null,sliceSerialize:h,sliceStream:p,write:d};let c=t.tokenize.call(u,a);return t.resolveAll&&o.push(t),u;function d(R){return s=Jt(s,R),w(),s[s.length-1]!==null?[]:(T(t,0),u.events=Vl(o,u.events,u),u.events)}function h(R,$){return $C(p(R),$)}function p(R){return TC(s,R)}function y(){const{_bufferIndex:R,_index:$,line:P,column:I,offset:z}=r;return{_bufferIndex:R,_index:$,line:P,column:I,offset:z}}function v(R){i[R.line]=R.column,b()}function w(){for(;r._index<s.length;){const R=s[r._index];if(typeof R=="string"){const $=r._index;for(r._bufferIndex<0&&(r._bufferIndex=0);r._index===$&&r._bufferIndex<R.length;)x(R.charCodeAt(r._bufferIndex))}else x(R)}}function x(R){c=c(R)}function m(R){xe(R)?(r.line++,r.column=1,r.offset+=R===-3?2:1,b()):R!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===s[r._index].length&&(r._bufferIndex=-1,r._index++)),u.previous=R}function g(R,$){const P=$||{};return P.type=R,P.start=y(),u.events.push(["enter",P,u]),l.push(P),P}function k(R){const $=l.pop();return $.end=y(),u.events.push(["exit",$,u]),$}function C(R,$){T(R,$.from)}function E(R,$){$.restore()}function A(R,$){return P;function P(I,z,B){let W,M,K,S;return Array.isArray(I)?Z(I):"tokenize"in I?Z([I]):X(I);function X(F){return G;function G(Y){const ee=Y!==null&&F[Y],D=Y!==null&&F.null,te=[...Array.isArray(ee)?ee:ee?[ee]:[],...Array.isArray(D)?D:D?[D]:[]];return Z(te)(Y)}}function Z(F){return W=F,M=0,F.length===0?B:_(F[M])}function _(F){return G;function G(Y){return S=L(),K=F,F.partial||(u.currentConstruct=F),F.name&&u.parser.constructs.disable.null.includes(F.name)?N():F.tokenize.call($?Object.assign(Object.create(u),$):u,a,O,N)(Y)}}function O(F){return R(K,S),z}function N(F){return S.restore(),++M<W.length?_(W[M]):B}}}function T(R,$){R.resolveAll&&!o.includes(R)&&o.push(R),R.resolve&&mn(u.events,$,u.events.length-$,R.resolve(u.events.slice($),u)),R.resolveTo&&(u.events=R.resolveTo(u.events,u))}function L(){const R=y(),$=u.previous,P=u.currentConstruct,I=u.events.length,z=Array.from(l);return{from:I,restore:B};function B(){r=R,u.previous=$,u.currentConstruct=P,u.events.length=I,l=z,b()}}function b(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function TC(e,t){const n=t.start._index,r=t.start._bufferIndex,i=t.end._index,o=t.end._bufferIndex;let s;if(n===i)s=[e[n].slice(r,o)];else{if(s=e.slice(n,i),r>-1){const l=s[0];typeof l=="string"?s[0]=l.slice(r):s.shift()}o>0&&s.push(e[i].slice(0,o))}return s}function $C(e,t){let n=-1;const r=[];let i;for(;++n<e.length;){const o=e[n];let s;if(typeof o=="string")s=o;else switch(o){case-5:{s="\r";break}case-4:{s=`
|
|
116
|
+
`;break}case-3:{s=`\r
|
|
117
|
+
`;break}case-2:{s=t?" ":" ";break}case-1:{if(!t&&i)continue;s=" ";break}default:s=String.fromCharCode(o)}i=o===-2,r.push(s)}return r.join("")}function IC(e){const r={constructs:jx([jC,...(e||{}).extensions||[]]),content:i(YE),defined:[],document:i(QE),flow:i(fC),lazy:{},string:i(mC),text:i(gC)};return r;function i(o){return s;function s(l){return _C(r,o,l)}}}function LC(e){for(;!Ox(e););return e}const gh=/[\0\t\n\r]/g;function AC(){let e=1,t="",n=!0,r;return i;function i(o,s,l){o=t+(typeof o=="string"?o.toString():new TextDecoder(s||void 0).decode(o));const a=[];let u=0;for(t="",n&&(o.charCodeAt(0)===65279&&u++,n=void 0);u<o.length;){gh.lastIndex=u;const c=gh.exec(o),d=c&&c.index!==void 0?c.index:o.length,h=o.charCodeAt(d);if(!c){t=o.slice(u);break}if(h===10&&u===d&&r)a.push(-3),r=void 0;else switch(r&&(a.push(-5),r=void 0),u<d&&(a.push(o.slice(u,d)),e+=d-u),h){case 0:{a.push(65533),e++;break}case 9:{const p=Math.ceil(e/4)*4;for(a.push(-2);e++<p;)a.push(-1);break}case 10:{a.push(-4),e=1;break}default:r=!0,e=1}u=d+1}return l&&(r&&a.push(-5),t&&a.push(t),a.push(null)),a}}const OC=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function RC(e){return e.replace(OC,MC)}function MC(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),o=i===120||i===88;return _x(n.slice(o?2:1),o?16:10)}return Vd(n)||e}const Bx={}.hasOwnProperty;function PC(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),FC(n)(LC(IC(n).document().write(AC()(e,t,!0))))}function FC(e){const t={afterExit:[],beforeEnter:[],transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:s(he),autolinkProtocol:b,autolinkEmail:b,atxHeading:s(ot),blockQuote:s(te),characterEscape:b,characterReference:b,codeFenced:s(ae),codeFencedFenceInfo:l,codeFencedFenceMeta:l,codeIndented:s(ae,l),codeText:s(Fe,l),codeTextData:b,data:b,codeFlowValue:b,definition:s(Ce),definitionDestinationString:l,definitionLabelString:l,definitionTitleString:l,emphasis:s(_e),hardBreakEscape:s(V),hardBreakTrailing:s(V),htmlFlow:s(ne,l),htmlFlowData:b,htmlText:s(ne,l),htmlTextData:b,image:s(oe),label:l,link:s(he),listItem:s(de),listItemValue:p,listOrdered:s(me,h),listUnordered:s(me),paragraph:s(Te),reference:O,referenceString:l,resourceDestinationString:l,resourceTitleString:l,setextHeading:s(ot),strong:s(nt),thematicBreak:s(q)},exit:{atxHeading:u(),atxHeadingSequence:E,autolink:u(),autolinkEmail:D,autolinkProtocol:ee,blockQuote:u(),characterEscapeValue:R,characterReferenceMarkerHexadecimal:F,characterReferenceMarkerNumeric:F,characterReferenceValue:G,characterReference:Y,codeFenced:u(x),codeFencedFence:w,codeFencedFenceInfo:y,codeFencedFenceMeta:v,codeFlowValue:R,codeIndented:u(m),codeText:u(B),codeTextData:R,data:R,definition:u(),definitionDestinationString:C,definitionLabelString:g,definitionTitleString:k,emphasis:u(),hardBreakEscape:u(P),hardBreakTrailing:u(P),htmlFlow:u(I),htmlFlowData:R,htmlText:u(z),htmlTextData:R,image:u(M),label:S,labelText:K,lineEnding:$,link:u(W),listItem:u(),listOrdered:u(),listUnordered:u(),paragraph:u(),referenceString:N,resourceDestinationString:X,resourceTitleString:Z,resource:_,setextHeading:u(L),setextHeadingLineSequence:T,setextHeadingText:A,strong:u(),thematicBreak:u()}};Ux(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(H){let J={type:"root",children:[],position:void 0};const ce={stack:[J],tokenStack:[],config:t,enter:a,exit:c,buffer:l,resume:d,data:n},ue=[],ve=[];let we=-1;for(;++we<H.length;)if(ve.push(H[we]),H[we][1].type==="listOrdered"||H[we][1].type==="listUnordered")if(H[we][0]==="enter")ue.push(ve.length-1);else{const Ne=ue.pop();o(ve,Ne)}for(H=ve,we=-1;++we<H.length;){const Ne=t[H[we][0]];H[we][0]==="enter"&&t.beforeEnter.length>0&&i(t.beforeEnter,{...ce,sliceSerialize:H[we][2].sliceSerialize},H[we][1]),Bx.call(Ne,H[we][1].type)&&Ne[H[we][1].type].call({...ce,sliceSerialize:H[we][2].sliceSerialize},H[we][1]),H[we][0]==="exit"&&t.afterExit.length>0&&i(t.afterExit,{...ce,sliceSerialize:H[we][2].sliceSerialize},H[we][1])}if(ce.tokenStack.length>0){const Ne=ce.tokenStack[ce.tokenStack.length-1];(Ne[1]||yh).call(ce,void 0,Ne[0])}for(J.position={start:Vn(H.length>0?H[0][1].start:{line:1,column:1,offset:0}),end:Vn(H.length>0?H[H.length-2][1].end:{line:1,column:1,offset:0})},we=-1;++we<t.transforms.length;)J=t.transforms[we](J)||J;return J}function i(H,J,ce){let ue=-1;for(;++ue<H.length;)H[ue].call(J,ce)}function o(H,J){const ce=H.length-1;let ue=J-1,ve=-1,we=!1,Ne,Re,Ke,Ue;const Nt=[];for(;++ue<=ce;){const st=H[ue];switch(st[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{st[0]==="enter"?ve++:ve--,Ue=void 0;break}case"lineEndingBlank":{st[0]==="enter"&&(Ne&&!Ue&&!ve&&!Ke&&(Ke=ue),Ue=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Ue=void 0}if(!ve&&st[0]==="enter"&&st[1].type==="listItemPrefix"||ve===-1&&st[0]==="exit"&&(st[1].type==="listUnordered"||st[1].type==="listOrdered")){if(Ne){let Mt=ue;for(Re=void 0;Mt--;){const jt=H[Mt];if(jt[1].type==="lineEnding"||jt[1].type==="lineEndingBlank"){if(jt[0]==="exit")continue;Re&&(H[Re][1].type="lineEndingBlank",we=!0),jt[1].type="lineEnding",Re=Mt}else if(!(jt[1].type==="linePrefix"||jt[1].type==="blockQuotePrefix"||jt[1].type==="blockQuotePrefixWhitespace"||jt[1].type==="blockQuoteMarker"||jt[1].type==="listItemIndent"))break}Ke&&(!Re||Ke<Re)&&(Ne._spread=!0),Ne.end=Object.assign({},Re?H[Re][1].start:st[1].end),Nt.push({at:Re||ue,event:["exit",Ne,st[2]]})}if(st[1].type==="listItemPrefix"){const Mt={type:"listItem",_spread:!1,start:Object.assign({},st[1].start),end:void 0};Ne=Mt,Nt.push({at:ue,event:["enter",Mt,st[2]]}),Ke=void 0,Ue=!0}}}const kt=H.splice(J);let ct=0;for(ue=-1;++ue<kt.length;){for(;ct<Nt.length&&Nt[ct].at===J+ue;)H.push(Nt[ct++].event);H.push(kt[ue])}H[J][1]._spread=we}function s(H,J){return ce;function ce(ue){a.call(this,H(ue),ue),J&&J.call(this,ue)}}function l(){this.stack.push({type:"fragment",children:[]})}function a(H,J,ce){this.stack[this.stack.length-1].children.push(H),this.stack.push(H),this.tokenStack.push([J,ce||void 0]),H.position={start:Vn(J.start),end:void 0}}function u(H){return J;function J(ce){H&&H.call(this,ce),c.call(this,ce)}}function c(H,J){const ce=this.stack.pop(),ue=this.tokenStack.pop();if(!ue)throw new Error("Cannot close `"+H.type+"` ("+ao({start:H.start,end:H.end})+"): it’s not open");ue[0].type!==H.type&&(J?J.call(this,H,ue[0]):(ue[1]||yh).call(this,H,ue[0])),ce.position.end=Vn(H.end)}function d(){return Wl(this.stack.pop())}function h(){this.data.expectingFirstListItemValue=!0}function p(H){if(this.data.expectingFirstListItemValue){const J=this.stack[this.stack.length-2];J.start=Number.parseInt(this.sliceSerialize(H),10),this.data.expectingFirstListItemValue=void 0}}function y(){const H=this.resume(),J=this.stack[this.stack.length-1];J.lang=H}function v(){const H=this.resume(),J=this.stack[this.stack.length-1];J.meta=H}function w(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function x(){const H=this.resume(),J=this.stack[this.stack.length-1];J.value=H.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function m(){const H=this.resume(),J=this.stack[this.stack.length-1];J.value=H.replace(/(\r?\n|\r)$/g,"")}function g(H){const J=this.resume(),ce=this.stack[this.stack.length-1];ce.label=J,ce.identifier=gn(this.sliceSerialize(H)).toLowerCase()}function k(){const H=this.resume(),J=this.stack[this.stack.length-1];J.title=H}function C(){const H=this.resume(),J=this.stack[this.stack.length-1];J.url=H}function E(H){const J=this.stack[this.stack.length-1];if(!J.depth){const ce=this.sliceSerialize(H).length;J.depth=ce}}function A(){this.data.setextHeadingSlurpLineEnding=!0}function T(H){const J=this.stack[this.stack.length-1];J.depth=this.sliceSerialize(H).codePointAt(0)===61?1:2}function L(){this.data.setextHeadingSlurpLineEnding=void 0}function b(H){const ce=this.stack[this.stack.length-1].children;let ue=ce[ce.length-1];(!ue||ue.type!=="text")&&(ue=Xe(),ue.position={start:Vn(H.start),end:void 0},ce.push(ue)),this.stack.push(ue)}function R(H){const J=this.stack.pop();J.value+=this.sliceSerialize(H),J.position.end=Vn(H.end)}function $(H){const J=this.stack[this.stack.length-1];if(this.data.atHardBreak){const ce=J.children[J.children.length-1];ce.position.end=Vn(H.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(J.type)&&(b.call(this,H),R.call(this,H))}function P(){this.data.atHardBreak=!0}function I(){const H=this.resume(),J=this.stack[this.stack.length-1];J.value=H}function z(){const H=this.resume(),J=this.stack[this.stack.length-1];J.value=H}function B(){const H=this.resume(),J=this.stack[this.stack.length-1];J.value=H}function W(){const H=this.stack[this.stack.length-1];if(this.data.inReference){const J=this.data.referenceType||"shortcut";H.type+="Reference",H.referenceType=J,delete H.url,delete H.title}else delete H.identifier,delete H.label;this.data.referenceType=void 0}function M(){const H=this.stack[this.stack.length-1];if(this.data.inReference){const J=this.data.referenceType||"shortcut";H.type+="Reference",H.referenceType=J,delete H.url,delete H.title}else delete H.identifier,delete H.label;this.data.referenceType=void 0}function K(H){const J=this.sliceSerialize(H),ce=this.stack[this.stack.length-2];ce.label=RC(J),ce.identifier=gn(J).toLowerCase()}function S(){const H=this.stack[this.stack.length-1],J=this.resume(),ce=this.stack[this.stack.length-1];if(this.data.inReference=!0,ce.type==="link"){const ue=H.children;ce.children=ue}else ce.alt=J}function X(){const H=this.resume(),J=this.stack[this.stack.length-1];J.url=H}function Z(){const H=this.resume(),J=this.stack[this.stack.length-1];J.title=H}function _(){this.data.inReference=void 0}function O(){this.data.referenceType="collapsed"}function N(H){const J=this.resume(),ce=this.stack[this.stack.length-1];ce.label=J,ce.identifier=gn(this.sliceSerialize(H)).toLowerCase(),this.data.referenceType="full"}function F(H){this.data.characterReferenceType=H.type}function G(H){const J=this.sliceSerialize(H),ce=this.data.characterReferenceType;let ue;ce?(ue=_x(J,ce==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):ue=Vd(J);const ve=this.stack[this.stack.length-1];ve.value+=ue}function Y(H){const J=this.stack.pop();J.position.end=Vn(H.end)}function ee(H){R.call(this,H);const J=this.stack[this.stack.length-1];J.url=this.sliceSerialize(H)}function D(H){R.call(this,H);const J=this.stack[this.stack.length-1];J.url="mailto:"+this.sliceSerialize(H)}function te(){return{type:"blockquote",children:[],position:void 0}}function ae(){return{type:"code",lang:null,meta:null,value:"",position:void 0}}function Fe(){return{type:"inlineCode",value:"",position:void 0}}function Ce(){return{type:"definition",identifier:"",label:null,title:null,url:"",position:void 0}}function _e(){return{type:"emphasis",children:[],position:void 0}}function ot(){return{type:"heading",depth:0,children:[],position:void 0}}function V(){return{type:"break",position:void 0}}function ne(){return{type:"html",value:"",position:void 0}}function oe(){return{type:"image",title:null,url:"",alt:null,position:void 0}}function he(){return{type:"link",title:null,url:"",children:[],position:void 0}}function me(H){return{type:"list",ordered:H.type==="listOrdered",start:null,spread:H._spread,children:[],position:void 0}}function de(H){return{type:"listItem",spread:H._spread,checked:null,children:[],position:void 0}}function Te(){return{type:"paragraph",children:[],position:void 0}}function nt(){return{type:"strong",children:[],position:void 0}}function Xe(){return{type:"text",value:"",position:void 0}}function q(){return{type:"thematicBreak",position:void 0}}}function Vn(e){return{line:e.line,column:e.column,offset:e.offset}}function Ux(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?Ux(e,r):DC(e,r)}}function DC(e,t){let n;for(n in t)if(Bx.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"afterExit":case"beforeEnter":{const r=t[n];r&&e[n].push(r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function yh(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+ao({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+ao({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+ao({start:t.start,end:t.end})+") is still open")}function zC(e){const t=this;t.parser=n;function n(r){return PC(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function BC(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function UC(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
|
|
118
|
+
`}]}function HC(e,t){const n=t.value?t.value+`
|
|
119
|
+
`:"",r={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(r.className=["language-"+i[0]]);let o={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(o.data={meta:t.meta}),e.patch(t,o),o=e.applyData(t,o),o={type:"element",tagName:"pre",properties:{},children:[o]},e.patch(t,o),o}function WC(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function VC(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function GC(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),i=Ii(r.toLowerCase()),o=e.footnoteOrder.indexOf(r);let s,l=e.footnoteCounts.get(r);l===void 0?(l=0,e.footnoteOrder.push(r),s=e.footnoteOrder.length):s=o+1,l+=1,e.footnoteCounts.set(r,l);const a={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+i,id:n+"fnref-"+i+(l>1?"-"+l:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(s)}]};e.patch(t,a);const u={type:"element",tagName:"sup",properties:{},children:[a]};return e.patch(t,u),e.applyData(t,u)}function KC(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function qC(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function Hx(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];const i=e.all(t),o=i[0];o&&o.type==="text"?o.value="["+o.value:i.unshift({type:"text",value:"["});const s=i[i.length-1];return s&&s.type==="text"?s.value+=r:i.push({type:"text",value:r}),i}function YC(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Hx(e,t);const i={src:Ii(r.url||"")};t.alt!==null&&t.alt!==void 0&&(i.alt=t.alt),r.title!==null&&r.title!==void 0&&(i.title=r.title);const o={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,o),e.applyData(t,o)}function XC(e,t){const n={src:Ii(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function QC(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function ZC(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Hx(e,t);const i={href:Ii(r.url||"")};r.title!==null&&r.title!==void 0&&(i.title=r.title);const o={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,o),e.applyData(t,o)}function JC(e,t){const n={href:Ii(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function eN(e,t,n){const r=e.all(t),i=n?tN(n):Wx(t),o={},s=[];if(typeof t.checked=="boolean"){const c=r[0];let d;c&&c.type==="element"&&c.tagName==="p"?d=c:(d={type:"element",tagName:"p",properties:{},children:[]},r.unshift(d)),d.children.length>0&&d.children.unshift({type:"text",value:" "}),d.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),o.className=["task-list-item"]}let l=-1;for(;++l<r.length;){const c=r[l];(i||l!==0||c.type!=="element"||c.tagName!=="p")&&s.push({type:"text",value:`
|
|
120
|
+
`}),c.type==="element"&&c.tagName==="p"&&!i?s.push(...c.children):s.push(c)}const a=r[r.length-1];a&&(i||a.type!=="element"||a.tagName!=="p")&&s.push({type:"text",value:`
|
|
121
|
+
`});const u={type:"element",tagName:"li",properties:o,children:s};return e.patch(t,u),e.applyData(t,u)}function tN(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const{children:n}=e;let r=-1;for(;!t&&++r<n.length;)t=Wx(n[r])}return t}function Wx(e){const{spread:t}=e;return t??e.children.length>1}function nN(e,t){const n={},r=e.all(t);let i=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++i<r.length;){const s=r[i];if(s.type==="element"&&s.tagName==="li"&&s.properties&&Array.isArray(s.properties.className)&&s.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const o={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,o),e.applyData(t,o)}function rN(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function iN(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function oN(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function sN(e,t){const n=e.all(t),r=n.shift(),i=[];if(r){const s={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],s),i.push(s)}if(n.length>0){const s={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},l=Bd(t.children[1]),a=wx(t.children[t.children.length-1]);l&&a&&(s.position={start:l,end:a}),i.push(s)}const o={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,o),e.applyData(t,o)}function lN(e,t,n){const r=n?n.children:void 0,o=(r?r.indexOf(t):1)===0?"th":"td",s=n&&n.type==="table"?n.align:void 0,l=s?s.length:t.children.length;let a=-1;const u=[];for(;++a<l;){const d=t.children[a],h={},p=s?s[a]:void 0;p&&(h.align=p);let y={type:"element",tagName:o,properties:h,children:[]};d&&(y.children=e.all(d),e.patch(d,y),y=e.applyData(d,y)),u.push(y)}const c={type:"element",tagName:"tr",properties:{},children:e.wrap(u,!0)};return e.patch(t,c),e.applyData(t,c)}function aN(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const xh=9,vh=32;function uN(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),i=0;const o=[];for(;r;)o.push(wh(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return o.push(wh(t.slice(i),i>0,!1)),o.join("")}function wh(e,t,n){let r=0,i=e.length;if(t){let o=e.codePointAt(r);for(;o===xh||o===vh;)r++,o=e.codePointAt(r)}if(n){let o=e.codePointAt(i-1);for(;o===xh||o===vh;)i--,o=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function cN(e,t){const n={type:"text",value:uN(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function dN(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const fN={blockquote:BC,break:UC,code:HC,delete:WC,emphasis:VC,footnoteReference:GC,heading:KC,html:qC,imageReference:YC,image:XC,inlineCode:QC,linkReference:ZC,link:JC,listItem:eN,list:nN,paragraph:rN,root:iN,strong:oN,table:sN,tableCell:aN,tableRow:lN,text:cN,thematicBreak:dN,toml:ms,yaml:ms,definition:ms,footnoteDefinition:ms};function ms(){}const Vx=-1,Gl=0,co=1,vl=2,Kd=3,qd=4,Yd=5,Xd=6,Gx=7,Kx=8,{defineProperty:pN}=Object,qx=typeof self=="object"?self:globalThis,kh=(e,t)=>{switch(e){case"Function":case"SharedWorker":case"Worker":case"eval":case"setInterval":case"setTimeout":throw new TypeError("unable to deserialize "+e)}return new qx[e](t)},hN=(e,t)=>{const n=(i,o)=>(e.set(o,i),i),r=i=>{if(e.has(i))return e.get(i);const[o,s]=t[i];switch(o){case Gl:case Vx:return n(s,i);case co:{const l=n([],i);for(const a of s)l.push(r(a));return l}case vl:{const l=n({},i);for(const[a,u]of s){const c=r(a),d=r(u);c==="__proto__"?pN(l,c,{value:d,configurable:!0,enumerable:!0,writable:!0}):l[c]=d}return l}case Kd:return n(new Date(s),i);case qd:{const{source:l,flags:a}=s;return n(new RegExp(l,a),i)}case Yd:{const l=n(new Map,i);for(const[a,u]of s)l.set(r(a),r(u));return l}case Xd:{const l=n(new Set,i);for(const a of s)l.add(r(a));return l}case Gx:{const{name:l,message:a}=s;return n(typeof qx[l]=="function"?kh(l,a):new Error(a),i)}case Kx:return n(BigInt(s),i);case"BigInt":return n(Object(BigInt(s)),i);case"ArrayBuffer":return n(new Uint8Array(s).buffer,s);case"DataView":{const{buffer:l}=new Uint8Array(s);return n(new DataView(l),s)}case"-0":return-0}return n(kh(o,s),i)};return r},bh=e=>hN(new Map,e)(0),wr="",{toString:mN}={},{keys:gN,is:yN}=Object,Vi=e=>{const t=typeof e;if(t!=="object"||!e)return[Gl,t];const n=mN.call(e).slice(8,-1);switch(n){case"Array":return[co,wr];case"Object":return[vl,wr];case"Date":return[Kd,wr];case"RegExp":return[qd,wr];case"Map":return[Yd,wr];case"Set":return[Xd,wr];case"DataView":return[co,n]}return n.includes("Array")?[co,n]:e instanceof Error?[Gx,e.name||"Error"]:[vl,n]},gs=([e,t])=>e===Gl&&(t==="function"||t==="symbol"),xN=(e,t,n,r)=>{const i=(s,l)=>{const a=r.push(s)-1;return n.set(l,a),a},o=s=>{if(n.has(s))return n.get(s);let[l,a]=Vi(s);switch(l){case Gl:{let c=s;switch(a){case"bigint":l=Kx,c=s.toString();break;case"number":if(!s&&yN(s,-0))return r.push(["-0"])-1;break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+a);c=null;break;case"undefined":return i([Vx],s)}return i([l,c],s)}case co:{if(a){let h=s;return a==="DataView"?h=new Uint8Array(s.buffer):a==="ArrayBuffer"&&(h=new Uint8Array(s)),i([a,[...h]],s)}const c=[],d=i([l,c],s);for(const h of s)c.push(o(h));return d}case vl:{if(a)switch(a){case"BigInt":return i([a,s.toString()],s);case"Boolean":case"Number":case"String":return i([a,s.valueOf()],s)}if(t&&"toJSON"in s)return o(s.toJSON());const c=[],d=i([l,c],s);for(const h of gN(s))(e||!gs(Vi(s[h])))&&c.push([o(h),o(s[h])]);return d}case Kd:return i([l,isNaN(s.getTime())?wr:s.toISOString()],s);case qd:{const{source:c,flags:d}=s;return i([l,{source:c,flags:d}],s)}case Yd:{const c=[],d=i([l,c],s);for(const[h,p]of s)(e||!(gs(Vi(h))||gs(Vi(p))))&&c.push([o(h),o(p)]);return d}case Xd:{const c=[],d=i([l,c],s);for(const h of s)(e||!gs(Vi(h)))&&c.push(o(h));return d}}const{message:u}=s;return i([l,{name:a,message:u}],s)};return o},Eh=(e,{json:t,lossy:n}={})=>{const r=[];return xN(!(t||n),!!t,new Map,r)(e),r},wl=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?bh(Eh(e,t)):structuredClone(e):(e,t)=>bh(Eh(e,t));function vN(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function wN(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function kN(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||vN,r=e.options.footnoteBackLabel||wN,i=e.options.footnoteLabel||"Footnotes",o=e.options.footnoteLabelTagName||"h2",s=e.options.footnoteLabelProperties||{className:["sr-only"]},l=[],a=[];let u=-1;for(;++u<e.footnoteOrder.length;){const c=e.footnoteById.get(e.footnoteOrder[u]);c&&(l[u]=e.all(c))}for(u=-1;++u<e.footnoteOrder.length;){const c=e.footnoteById.get(e.footnoteOrder[u]);if(!c)continue;const d=l[u],h=String(c.identifier).toUpperCase(),p=Ii(h.toLowerCase());let y=0;const v=[],w=e.footnoteCounts.get(h);for(;w!==void 0&&++y<=w;){v.length>0&&v.push({type:"text",value:" "});let g=typeof n=="string"?n:n(u,y);typeof g=="string"&&(g={type:"text",value:g}),v.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+p+(y>1?"-"+y:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(u,y),className:["data-footnote-backref"]},children:Array.isArray(g)?g:[g]})}const x=d[d.length-1];if(x&&x.type==="element"&&x.tagName==="p"){const g=x.children[x.children.length-1];g&&g.type==="text"?g.value+=" ":x.children.push({type:"text",value:" "}),x.children.push(...v)}else d.push(...v);const m={type:"element",tagName:"li",properties:{id:t+"fn-"+p},children:e.wrap(d,!0)};e.patch(c,m),a.push(m)}if(a.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:o,properties:{...wl(s),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
|
|
122
|
+
`},{type:"element",tagName:"ol",properties:{},children:e.wrap(a,!0)},{type:"text",value:`
|
|
123
|
+
`}]}}const Kl=function(e){if(e==null)return CN;if(typeof e=="function")return ql(e);if(typeof e=="object")return Array.isArray(e)?bN(e):EN(e);if(typeof e=="string")return SN(e);throw new Error("Expected function, string, or object as test")};function bN(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Kl(e[n]);return ql(r);function r(...i){let o=-1;for(;++o<t.length;)if(t[o].apply(this,i))return!0;return!1}}function EN(e){const t=e;return ql(n);function n(r){const i=r;let o;for(o in e)if(i[o]!==t[o])return!1;return!0}}function SN(e){return ql(t);function t(n){return n&&n.type===e}}function ql(e){return t;function t(n,r,i){return!!(NN(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function CN(){return!0}function NN(e){return e!==null&&typeof e=="object"&&"type"in e}const Yx=[],jN=!0,fo=!1,vc="skip";function wc(e,t,n,r){if(!e||typeof e!="object")throw new Error("Unexpected value `"+e+"` for `tree`, expected node");let i=!0,o,s,l,a;if(typeof n=="function"||n&&typeof n=="object"?(o=t,s=n,r&&(i=!1)):(s=t,n&&(i=!1)),typeof s=="function")l=s;else if(s&&typeof s=="object"){if(!(s.enter===null||s.enter===void 0))if(typeof s.enter=="function")l=s.enter;else throw new Error("Unexpected value `"+s.enter+"` for `visitors.enter`, expected optional visitor");if(typeof s.exit=="function")a=s.exit;else throw new Error("Unexpected value `"+s.exit+"` for `visitors.exit`, expected visitor (pass a visitor directly if you only want an enter visitor)")}else throw new Error("Unexpected value `"+s+"` for `enter` or `visitors`, expected visitor or object with visitors");const u=Kl(o),c=i?1:-1;d(e,void 0,[])();function d(h,p,y){const v=h&&typeof h=="object"?h:{};if(typeof v.type=="string"){const x=typeof v.tagName=="string"?v.tagName:typeof v.name=="string"?v.name:void 0;Object.defineProperty(w,"name",{value:"node ("+(h.type+(x?"<"+x+">":""))+")"})}return w;function w(){const x=!o||u(h,p,y[y.length-1]||void 0);let m=Yx;if(l&&x&&(m=Sh(l(h,y,p)),m[0]===fo))return m;if("children"in h&&h.children){const g=h;if(g.children&&m[0]!==vc){let k=(i?-1:g.children.length)+c;const C=[...y,g];for(;k>-1&&k<g.children.length;){const E=g.children[k],A=d(E,k,C)();if(A[0]===fo)return A;k=typeof A[1]=="number"?A[1]:k+c}}}if(a&&x){const g=Sh(a(h,y,p));if(g[0]===vc)throw new Error("Unexpected value `"+g[0]+"` from `exit`, expected `CONTINUE`, `EXIT`, index, or nothing");if(g[0]===fo||typeof g[1]=="number")return g}return m}}}function Sh(e){return Array.isArray(e)?e:typeof e=="number"?[jN,e]:e==null?Yx:[e]}function Yl(e,t,n,r){let i,o,s;o=t,s=n,typeof o=="function"?wc(e,i,kc(o),s):wc(e,i,_N(o),s)}function _N(e){return!e||typeof e!="object"?e:{enter:typeof e.enter=="function"?kc(e.enter):e.enter,exit:typeof e.exit=="function"?kc(e.exit):e.exit}}function kc(e){return t;function t(n,r,i){return e(n,i,r[r.length-1])}}const bc={}.hasOwnProperty,TN={};function $N(e,t){const n=t||TN,r=new Map,i=new Map,o=new Map,s={...fN,...n.handlers},l={all:u,applyData:LN,definitionById:r,footnoteById:i,footnoteCounts:o,footnoteOrder:[],handlers:s,one:a,options:n,patch:IN,wrap:ON};return Yl(e,function(c){if(c.type==="definition"||c.type==="footnoteDefinition"){const d=String(c.identifier).toUpperCase();c.type==="definition"?r.has(d)||r.set(d,c):i.has(d)||i.set(d,c)}}),l;function a(c,d){const{type:h}=c,p=l.handlers[h];if(bc.call(l.handlers,h)&&p)return p(l,c,d);if(l.options.passThrough&&l.options.passThrough.includes(h)){if("children"in c){const{children:v,...w}=c;return{...wl(w),children:l.all(c)}}return wl(c)}return(l.options.unknownHandler||AN)(l,c,d)}function u(c){const d=[];if("children"in c){const h=c.children;let p=-1;for(;++p<h.length;){const y=l.one(h[p],c);if(y){if(p&&h[p-1].type==="break"&&(!Array.isArray(y)&&y.type==="text"&&(y.value=Ch(y.value)),!Array.isArray(y)&&y.type==="element")){const v=y.children[0];v&&v.type==="text"&&(v.value=Ch(v.value))}Array.isArray(y)?d.push(...y):d.push(y)}}}return d}}function IN(e,t){e.position&&(t.position=wE(e))}function LN(e,t){let n=t;if(e&&e.data){const{hChildren:r,hName:i,hProperties:o}=e.data;if(typeof i=="string")if(n.type==="element")n.tagName=i;else{const s="children"in n?n.children:[n];n={type:"element",tagName:i,properties:{},children:s}}n.type==="element"&&o&&Object.assign(n.properties,wl(o)),"children"in n&&n.children&&r!==null&&r!==void 0&&(n.children=r)}return n}function AN(e,t){const n=t.data||{},r="value"in t&&!(bc.call(n,"hProperties")||bc.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function ON(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
|
|
124
|
+
`});++r<e.length;)r&&n.push({type:"text",value:`
|
|
125
|
+
`}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
|
|
126
|
+
`}),n}function Ch(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function Nh(e,t){const n=$N(e,t),r=n.one(e,void 0),i=kN(n),o=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&o.children.push({type:"text",value:`
|
|
127
|
+
`},i),o}function RN(e,t){return e&&"run"in e?async function(n,r){const i=Nh(n,{file:r,...t});await e.run(i,r)}:function(n,r){return Nh(n,{file:r,...e||t})}}function jh(e){if(e)throw e}var Fs=Object.prototype.hasOwnProperty,Xx=Object.prototype.toString,_h=Object.defineProperty,Th=Object.getOwnPropertyDescriptor,$h=function(t){return typeof Array.isArray=="function"?Array.isArray(t):Xx.call(t)==="[object Array]"},Ih=function(t){if(!t||Xx.call(t)!=="[object Object]")return!1;var n=Fs.call(t,"constructor"),r=t.constructor&&t.constructor.prototype&&Fs.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!n&&!r)return!1;var i;for(i in t);return typeof i>"u"||Fs.call(t,i)},Lh=function(t,n){_h&&n.name==="__proto__"?_h(t,n.name,{enumerable:!0,configurable:!0,value:n.newValue,writable:!0}):t[n.name]=n.newValue},Ah=function(t,n){if(n==="__proto__")if(Fs.call(t,n)){if(Th)return Th(t,n).value}else return;return t[n]},MN=function e(){var t,n,r,i,o,s,l=arguments[0],a=1,u=arguments.length,c=!1;for(typeof l=="boolean"&&(c=l,l=arguments[1]||{},a=2),(l==null||typeof l!="object"&&typeof l!="function")&&(l={});a<u;++a)if(t=arguments[a],t!=null)for(n in t)r=Ah(l,n),i=Ah(t,n),l!==i&&(c&&i&&(Ih(i)||(o=$h(i)))?(o?(o=!1,s=r&&$h(r)?r:[]):s=r&&Ih(r)?r:{},Lh(l,{name:n,newValue:e(c,s,i)})):typeof i<"u"&&Lh(l,{name:n,newValue:i}));return l};const Ua=Qh(MN);function Ec(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function PN(){const e=[],t={run:n,use:r};return t;function n(...i){let o=-1;const s=i.pop();if(typeof s!="function")throw new TypeError("Expected function as last argument, not "+s);l(null,...i);function l(a,...u){const c=e[++o];let d=-1;if(a){s(a);return}for(;++d<i.length;)(u[d]===null||u[d]===void 0)&&(u[d]=i[d]);i=u,c?FN(c,l)(...u):s(null,...u)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),t}}function FN(e,t){let n;return r;function r(...s){const l=e.length>s.length;let a;l&&s.push(i);try{a=e.apply(this,s)}catch(u){const c=u;if(l&&n)throw c;return i(c)}l||(a&&a.then&&typeof a.then=="function"?a.then(o,i):a instanceof Error?i(a):o(a))}function i(s,...l){n||(n=!0,t(s,...l))}function o(s){i(null,s)}}const bn={basename:DN,dirname:zN,extname:BN,join:UN,sep:"/"};function DN(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Wo(e);let n=0,r=-1,i=e.length,o;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(o){n=i+1;break}}else r<0&&(o=!0,r=i+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let s=-1,l=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(o){n=i+1;break}}else s<0&&(o=!0,s=i+1),l>-1&&(e.codePointAt(i)===t.codePointAt(l--)?l<0&&(r=i):(l=-1,r=s));return n===r?r=s:r<0&&(r=e.length),e.slice(n,r)}function zN(e){if(Wo(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function BN(e){Wo(e);let t=e.length,n=-1,r=0,i=-1,o=0,s;for(;t--;){const l=e.codePointAt(t);if(l===47){if(s){r=t+1;break}continue}n<0&&(s=!0,n=t+1),l===46?i<0?i=t:o!==1&&(o=1):i>-1&&(o=-1)}return i<0||n<0||o===0||o===1&&i===n-1&&i===r+1?"":e.slice(i,n)}function UN(...e){let t=-1,n;for(;++t<e.length;)Wo(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":HN(n)}function HN(e){Wo(e);const t=e.codePointAt(0)===47;let n=WN(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function WN(e,t){let n="",r=0,i=-1,o=0,s=-1,l,a;for(;++s<=e.length;){if(s<e.length)l=e.codePointAt(s);else{if(l===47)break;l=47}if(l===47){if(!(i===s-1||o===1))if(i!==s-1&&o===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(a=n.lastIndexOf("/"),a!==n.length-1){a<0?(n="",r=0):(n=n.slice(0,a),r=n.length-1-n.lastIndexOf("/")),i=s,o=0;continue}}else if(n.length>0){n="",r=0,i=s,o=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(i+1,s):n=e.slice(i+1,s),r=s-i-1;i=s,o=0}else l===46&&o>-1?o++:o=-1}return n}function Wo(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const VN={cwd:GN};function GN(){return"/"}function Sc(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function KN(e){if(typeof e=="string")e=new URL(e);else if(!Sc(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return qN(e)}function qN(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const r=t.codePointAt(n+2);if(r===70||r===102){const i=new TypeError("File URL path must not include encoded / characters");throw i.code="ERR_INVALID_FILE_URL_PATH",i}}return decodeURIComponent(t)}const Ha=["history","path","basename","stem","extname","dirname"];class Qx{constructor(t){let n;t?Sc(t)?n={path:t}:typeof t=="string"||YN(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":VN.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<Ha.length;){const o=Ha[r];o in n&&n[o]!==void 0&&n[o]!==null&&(this[o]=o==="history"?[...n[o]]:n[o])}let i;for(i in n)Ha.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?bn.basename(this.path):void 0}set basename(t){Va(t,"basename"),Wa(t,"basename"),this.path=bn.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?bn.dirname(this.path):void 0}set dirname(t){Oh(this.basename,"dirname"),this.path=bn.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?bn.extname(this.path):void 0}set extname(t){if(Wa(t,"extname"),Oh(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=bn.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){Sc(t)&&(t=KN(t)),Va(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?bn.basename(this.path,this.extname):void 0}set stem(t){Va(t,"stem"),Wa(t,"stem"),this.path=bn.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const i=this.message(t,n,r);throw i.fatal=!0,i}info(t,n,r){const i=this.message(t,n,r);return i.fatal=void 0,i}message(t,n,r){const i=new Hl(t,n,r);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function Wa(e,t){if(e&&e.includes(bn.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+bn.sep+"`")}function Va(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function Oh(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function YN(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const XN=function(e){const r=this.constructor.prototype,i=r[e],o=function(){return i.apply(o,arguments)};return Object.setPrototypeOf(o,r),o},QN={}.hasOwnProperty;class Qd extends XN{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=PN()}copy(){const t=new Qd;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(Ua(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(qa("data",this.frozen),this.namespace[t]=n,this):QN.call(this.namespace,t)&&this.namespace[t]||void 0:t?(qa("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const i=n.call(t,...r);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=ys(t),r=this.parser||this.Parser;return Ga("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),Ga("process",this.parser||this.Parser),Ka("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(o,s){const l=ys(t),a=r.parse(l);r.run(a,l,function(c,d,h){if(c||!d||!h)return u(c);const p=d,y=r.stringify(p,h);ej(y)?h.value=y:h.result=y,u(c,h)});function u(c,d){c||!d?s(c):o?o(d):n(void 0,d)}}}processSync(t){let n=!1,r;return this.freeze(),Ga("processSync",this.parser||this.Parser),Ka("processSync",this.compiler||this.Compiler),this.process(t,i),Mh("processSync","process",n),r;function i(o,s){n=!0,jh(o),r=s}}run(t,n,r){Rh(t),this.freeze();const i=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?o(void 0,r):new Promise(o);function o(s,l){const a=ys(n);i.run(t,a,u);function u(c,d,h){const p=d||t;c?l(c):s?s(p):r(void 0,p,h)}}}runSync(t,n){let r=!1,i;return this.run(t,n,o),Mh("runSync","run",r),i;function o(s,l){jh(s),i=l,r=!0}}stringify(t,n){this.freeze();const r=ys(n),i=this.compiler||this.Compiler;return Ka("stringify",i),Rh(t),i(t,r)}use(t,...n){const r=this.attachers,i=this.namespace;if(qa("use",this.frozen),t!=null)if(typeof t=="function")a(t,n);else if(typeof t=="object")Array.isArray(t)?l(t):s(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function o(u){if(typeof u=="function")a(u,[]);else if(typeof u=="object")if(Array.isArray(u)){const[c,...d]=u;a(c,d)}else s(u);else throw new TypeError("Expected usable value, not `"+u+"`")}function s(u){if(!("plugins"in u)&&!("settings"in u))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");l(u.plugins),u.settings&&(i.settings=Ua(!0,i.settings,u.settings))}function l(u){let c=-1;if(u!=null)if(Array.isArray(u))for(;++c<u.length;){const d=u[c];o(d)}else throw new TypeError("Expected a list of plugins, not `"+u+"`")}function a(u,c){let d=-1,h=-1;for(;++d<r.length;)if(r[d][0]===u){h=d;break}if(h===-1)r.push([u,...c]);else if(c.length>0){let[p,...y]=c;const v=r[h][1];Ec(v)&&Ec(p)&&(p=Ua(!0,v,p)),r[h]=[u,p,...y]}}}}const ZN=new Qd().freeze();function Ga(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Ka(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function qa(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function Rh(e){if(!Ec(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function Mh(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function ys(e){return JN(e)?e:new Qx(e)}function JN(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function ej(e){return typeof e=="string"||tj(e)}function tj(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const nj="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",Ph=[],Fh={allowDangerousHtml:!0},rj=/^(https?|ircs?|mailto|xmpp)$/i,ij=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function oj(e){const t=sj(e),n=lj(e);return aj(t.runSync(t.parse(n),n),e)}function sj(e){const t=e.rehypePlugins||Ph,n=e.remarkPlugins||Ph,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...Fh}:Fh;return ZN().use(zC).use(n).use(RN,r).use(t)}function lj(e){const t=e.children||"",n=new Qx;return typeof t=="string"&&(n.value=t),n}function aj(e,t){const n=t.allowedElements,r=t.allowElement,i=t.components,o=t.disallowedElements,s=t.skipHtml,l=t.unwrapDisallowed,a=t.urlTransform||Zx;for(const c of ij)Object.hasOwn(t,c.from)&&(""+c.from+(c.to?"use `"+c.to+"` instead":"remove it")+nj+c.id,void 0);return t.className&&(e={type:"element",tagName:"div",properties:{className:t.className},children:e.type==="root"?e.children:[e]}),Yl(e,u),NE(e,{Fragment:f.Fragment,components:i,ignoreInvalidStyle:!0,jsx:f.jsx,jsxs:f.jsxs,passKeys:!0,passNode:!0});function u(c,d,h){if(c.type==="raw"&&h&&typeof d=="number")return s?h.children.splice(d,1):h.children[d]={type:"text",value:c.value},d;if(c.type==="element"){let p;for(p in Da)if(Object.hasOwn(Da,p)&&Object.hasOwn(c.properties,p)){const y=c.properties[p],v=Da[p];(v===null||v.includes(c.tagName))&&(c.properties[p]=a(String(y||""),p,c))}}if(c.type==="element"){let p=n?!n.includes(c.tagName):o?o.includes(c.tagName):!1;if(!p&&r&&typeof d=="number"&&(p=!r(c,d,h)),p&&h&&typeof d=="number")return l&&c.children?h.children.splice(d,1,...c.children):h.children.splice(d,1),d}}}function Zx(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),i=e.indexOf("/");return t===-1||i!==-1&&t>i||n!==-1&&t>n||r!==-1&&t>r||rj.test(e.slice(0,t))?e:""}function Dh(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}function uj(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function cj(e,t,n){const i=Kl((n||{}).ignore||[]),o=dj(t);let s=-1;for(;++s<o.length;)wc(e,l);function l(u,c,d){if(u.type==="text"&&typeof d=="number")return a(u,c,d);if(i(u,d,c[c.length-1]))return vc}function a(u,c,d){const h=c[c.length-1],p=o[s][0],y=o[s][1];let v=0,w=!1,x=[];p.lastIndex=0;let m=p.exec(u.value);for(;m;){const k=m.index,C={index:m.index,input:m.input,stack:[...c,u]};let E=y(...m,C);if(typeof E=="string"&&(E=E.length>0?{type:"text",value:E}:void 0),E===!1)p.lastIndex=k+1;else{if(v!==k&&g({type:"text",value:u.value.slice(v,k)}),Array.isArray(E))for(const A of E)g(A);else E&&g(E);v=k+m[0].length,w=!0}if(!p.global)break;m=p.exec(u.value)}return w?(v<u.value.length&&g({type:"text",value:u.value.slice(v)}),h.children.splice(d,1,...x)):x=[u],d+x.length;function g(k){const C=x[x.length-1];C&&C.type==="text"&&k.type==="text"?C.value+=k.value:x.push(k)}}}function dj(e){if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const t=[],n=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<n.length;){const i=n[r];t.push([fj(i[0]),pj(i[1])])}return t}function fj(e){return typeof e=="string"?new RegExp(uj(e),"g"):e}function pj(e){return typeof e=="function"?e:function(){return e}}const Ya="phrasing",Xa=["autolink","link","image","label"];function hj(){return{transforms:[kj],enter:{literalAutolink:gj,literalAutolinkEmail:Qa,literalAutolinkHttp:Qa,literalAutolinkWww:Qa},exit:{literalAutolink:wj,literalAutolinkEmail:vj,literalAutolinkHttp:yj,literalAutolinkWww:xj}}}function mj(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Ya,notInConstruct:Xa},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Ya,notInConstruct:Xa},{character:":",before:"[ps]",after:"\\/",inConstruct:Ya,notInConstruct:Xa}]}}function gj(e){this.enter({type:"link",title:null,url:"",children:[],position:void 0},e)}function Qa(e){this.config.enter.autolinkProtocol.call(this,e)}function yj(e){this.config.exit.autolinkProtocol.call(this,e)}function xj(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function vj(e){this.config.exit.autolinkEmail.call(this,e)}function wj(e){this.exit(e)}function kj(e){cj(e,[[new RegExp("(?<![\\da-z])(https?:\\/\\/|www(?=\\.))([\\w-]*\\.[\\w\\-.]*)([^\\t\\n\\r ]*)","gi"),bj],[new RegExp("(?<![\\w+\\-.@])xmpp:([\\w+\\-.]+)@([\\w-]+(?:\\.[\\w-]+)+)(\\/(?:[\\w\\-/]|\\.(?=[\\dA-Za-z]))*)?","g"),Cj],[new RegExp("(?<![\\w+\\-.@])mailto:([\\w+\\-.]+)@([\\w-]+(?:\\.[\\w-]+)+)","g"),Sj],[new RegExp("(?<![\\w+\\-.]|(?:^|[^\\d@A-Za-z])(?:mailto|xmpp):)([\\w+\\-.]+)@([\\w-]+(?:\\.[\\w-]+)+)","g"),Ej]],{ignore:["link","linkReference"]})}function bj(e,t,n,r,i){if(!_j(i))return!1;let o="";if(/^w/i.test(t)&&(n=t+n,t="",o="http://"),Uo(n.charCodeAt(0))||!Nj(n))return!1;const s=jj(n+r),l={type:"link",title:null,url:o+t+s[0],children:[{type:"text",value:t+s[0],position:void 0}],position:void 0};return s[1]?[l,{type:"text",value:s[1],position:void 0}]:l}function Ej(e,t,n){return/[\d\-_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n,position:void 0}],position:void 0}}function Sj(e,t,n){if(/[\d\-_]$/.test(n))return!1;const r="mailto:"+t+"@"+n;return{type:"link",title:null,url:r,children:[{type:"text",value:r,position:void 0}],position:void 0}}function Cj(e,t,n,r,i){if(/[\d\-_]$/.test(n)||r&&(!/[A-Za-z]$/.test(r)||i.input.charAt(i.index+e.length)==="@"))return!1;const o="xmpp:"+t+"@"+n+(r||"");return{type:"link",title:null,url:o,children:[{type:"text",value:o,position:void 0}],position:void 0}}function Nj(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[\dA-Za-z]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[\dA-Za-z]/.test(t[t.length-2])))}function jj(e){let t=e.length;for(;t>0;){const s=e.charCodeAt(t-1);if(s===33||s===34||s===38||s===39||s===41||s===44||s===46||s===58||s===59||s===60||s===62||s===63||s===93||s===125)t--;else break}if(t===e.length)return[e,void 0];let n=e.slice(t);e=e.slice(0,t);let r=n.indexOf(")");const i=Dh(e,"(");let o=Dh(e,")");for(;r!==-1&&i>o;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),o++;return[e,n]}function _j(e){const t=e.input.charCodeAt(e.index-1);return e.index===0||Fr(t)||Uo(t)}Jx.peek=Pj;function Tj(){this.buffer()}function $j(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function Ij(){this.buffer()}function Lj(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function Aj(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=gn(this.sliceSerialize(e)).toLowerCase(),n.label=t}function Oj(e){this.exit(e)}function Rj(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=gn(this.sliceSerialize(e)).toLowerCase(),n.label=t}function Mj(e){this.exit(e)}function Pj(){return"["}function Jx(e,t,n,r){const i=n.createTracker(r);let o=i.move("[^");const s=n.enter("footnoteReference"),l=n.enter("reference");return o+=i.move(n.safe(n.associationId(e),{after:"]",before:o})),l(),s(),o+=i.move("]"),o}function Fj(){return{enter:{gfmFootnoteCallString:Tj,gfmFootnoteCall:$j,gfmFootnoteDefinitionLabelString:Ij,gfmFootnoteDefinition:Lj},exit:{gfmFootnoteCallString:Aj,gfmFootnoteCall:Oj,gfmFootnoteDefinitionLabelString:Rj,gfmFootnoteDefinition:Mj}}}function Dj(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:Jx},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,i,o,s){const l=o.createTracker(s);let a=l.move("[^");const u=o.enter("footnoteDefinition"),c=o.enter("label");return a+=l.move(o.safe(o.associationId(r),{before:a,after:"]"})),c(),a+=l.move("]:"),r.children&&r.children.length>0&&(l.shift(4),a+=l.move((t?`
|
|
128
|
+
`:" ")+o.indentLines(o.containerFlow(r,l.current()),t?ev:zj))),u(),a}}function zj(e,t,n){return t===0?e:ev(e,t,n)}function ev(e,t,n){return(n?"":" ")+e}const Bj=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];Zd.attention=Gj;Zd.peek=Kj;function Uj(){return{canContainEols:["delete"],enter:{strikethrough:Wj},exit:{strikethrough:Vj}}}function Hj(){return{handlers:{delete:Zd},unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:Bj}]}}function Wj(e){this.enter({type:"delete",children:[],position:void 0},e)}function Vj(e){this.exit(e)}function Zd(e,t,n,r){const i=n.createTracker(r),o=n.stack.includes("strikethrough")?"~":"~~",s=n.enter("strikethrough");let l=i.move(o);return l+=n.containerPhrasing(e,{...i.current(),before:l,after:"~"}),l+=i.move(o),s(),l}function Gj(){return{construct:"strikethrough",markers:["~"],sizes:[2,1]}}function Kj(){return"~"}function qj(e){return e.length}function Yj(e,t){const n=t||{},r=(n.align||[]).concat(),i=n.stringLength||qj,o=[],s=[],l=[],a=[];let u=0,c=-1;for(;++c<e.length;){const v=[],w=[];let x=-1;for(e[c].length>u&&(u=e[c].length);++x<e[c].length;){const m=Xj(e[c][x]);if(n.alignDelimiters!==!1){const g=i(m);w[x]=g,(a[x]===void 0||g>a[x])&&(a[x]=g)}v.push(m)}s[c]=v,l[c]=w}let d=-1;if(typeof r=="object"&&"length"in r)for(;++d<u;)o[d]=zh(r[d]);else{const v=zh(r);for(;++d<u;)o[d]=v}d=-1;const h=[],p=[];for(;++d<u;){const v=o[d];let w="",x="";v===99?(w=":",x=":"):v===108?w=":":v===114&&(x=":");let m=n.alignDelimiters===!1?1:Math.max(1,a[d]-w.length-x.length);const g=w+"-".repeat(m)+x;n.alignDelimiters!==!1&&(m=w.length+m+x.length,m>a[d]&&(a[d]=m),p[d]=m),h[d]=g}s.splice(1,0,h),l.splice(1,0,p),c=-1;const y=[];for(;++c<s.length;){const v=s[c],w=l[c],x=n.fillRows===!1?Math.max(1,s[c===1?0:c].length):u;d=-1;const m=[];for(;++d<x;){const g=v[d]||"";let k="",C="";if(n.alignDelimiters!==!1){const E=a[d]-(w[d]||0),A=o[d];if(A===114)k=" ".repeat(E);else if(A===99){const T=E/2;E%2?(k=" ".repeat(T+.5),C=" ".repeat(T-.5)):(k=" ".repeat(T),C=k)}else C=" ".repeat(E)}n.delimiterStart!==!1&&!d&&m.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&g==="")&&(n.delimiterStart!==!1||d)&&m.push(" "),n.alignDelimiters!==!1&&m.push(k),m.push(g),n.alignDelimiters!==!1&&m.push(C),n.padding!==!1&&m.push(" "),(n.delimiterEnd!==!1||d!==x-1)&&m.push("|")}y.push(n.delimiterEnd===!1?m.join("").replace(/ +$/,""):m.join(""))}return y.join(`
|
|
129
|
+
`)}function Xj(e){return e==null?"":String(e)}function zh(e){const t=typeof e=="string"?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}const Qj=Kl(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function Zj(e,t,n,r){const i=n.enter("blockquote"),o=n.createTracker(r);o.move("> "),o.shift(2);const s=n.indentLines(n.containerFlow(e,o.current()),Jj);return i(),s}function Jj(e,t,n){return">"+(n?"":" ")+e}function e_(e,t){return Bh(e,t.inConstruct,!0)&&!Bh(e,t.notInConstruct,!1)}function Bh(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function Uh(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;){const o=n.unsafe[i];if(o.character===`
|
|
130
|
+
`&&!o.before&&!o.after&&e_(n.stack,o))return/[\t ]/.test(r.before)?"":" "}return`\\
|
|
131
|
+
`}function t_(e,t){const n=String(e);let r=n.indexOf(t),i=r,o=0,s=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===i?++o>s&&(s=o):o=1,i=r+t.length,r=n.indexOf(t,i);return s}function n_(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^\n\r ]/.test(e.value)&&!/^[\t ]*(?:[\n\r]|$)|(?:^|[\n\r])[\t ]*$/.test(e.value))}function r_(e){const t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function i_(e,t,n,r){const i=r_(n),o=e.value||"";if(n_(e,n)){const d=n.enter("codeIndented"),h=n.indentLines(o,o_);return d(),h}const s=n.createTracker(r),l=i.repeat(Math.max(t_(o,i)+1,3)),a=n.enter("codeFenced"),u=i==="`"?"GraveAccent":"Tilde";let c=s.move(l);if(e.lang){const d=n.enter(`codeFencedLang${u}`);c+=s.move(n.safe(e.lang,{before:c,after:" ",encode:["`"],...s.current()})),d()}if(e.lang&&e.meta){const d=n.enter(`codeFencedMeta${u}`);c+=s.move(" "),c+=s.move(n.safe(e.meta,{before:c,after:`
|
|
132
|
+
`,encode:["`"],...s.current()})),d()}return c+=s.move(`
|
|
133
|
+
`),o&&(c+=s.move(o+`
|
|
134
|
+
`)),c+=s.move(l),a(),c}function o_(e,t,n){return(n?"":" ")+e}function Jd(e){const t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function s_(e,t,n,r){const i=Jd(n),o=i==='"'?"Quote":"Apostrophe",s=n.enter("definition");let l=n.enter("label");const a=n.createTracker(r);let u=a.move("[");return u+=a.move(n.safe(n.associationId(e),{before:u,after:"]",...a.current()})),u+=a.move("]: "),l(),!e.url||/[\0- \u007F]/.test(e.url)?(l=n.enter("destinationLiteral"),u+=a.move("<"),u+=a.move(n.safe(e.url,{before:u,after:">",...a.current()})),u+=a.move(">")):(l=n.enter("destinationRaw"),u+=a.move(n.safe(e.url,{before:u,after:e.title?" ":`
|
|
135
|
+
`,...a.current()}))),l(),e.title&&(l=n.enter(`title${o}`),u+=a.move(" "+i),u+=a.move(n.safe(e.title,{before:u,after:i,...a.current()})),u+=a.move(i),l()),s(),u}function l_(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function kl(e){const t=e.codePointAt(0);return t===void 0?"":String.fromCodePoint(t)}function hi(e){const t=e.codePointAt(e.length-2);return t!==void 0&&t>65535?e.slice(-2):e.slice(-1)}function tv(e){return"&#x"+e.toString(16).toUpperCase()+";"}function Hh(e,t,n){const r=cr(e),i=cr(t);return r===void 0?i===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}function a_(e){if(e.charCodeAt(0)!==60)return;const t=e.charCodeAt(1);if(t===33){const l=e.charCodeAt(2);return l===45?2:l===91?5:pt(l)?4:void 0}if(t===63)return 3;const n=t===47,r=n?2:1;let i=r,o=e.charCodeAt(i);if(!pt(o))return;for(;o===45||ht(o);)o=e.charCodeAt(++i);const s=e.slice(r,i).toLowerCase();return!n&&o!==47&&xc.includes(s)?1:Fx.includes(s)?6:7}const nv=new Map([["*",!1],["_",!0]]);function u_(e,t,n){const r=new Set;for(const o of e){const s=n.get(o);if(s&&o.attention&&t.some(l=>l.attention===o.attention))for(const l of s.tokens)r.add(l.attention)}const i=[];for(const o of e)o.attention&&r.delete(o.attention)&&i.push(o.attention);return i.reverse(),i}function rv(e,t,n){const r=[],i=new Map,o=new Map;let s=0;for(;s<e.length;){if(!e[s].attention){s++;continue}const l=e[s].value.charAt(0),a=nv.get(l);let u=s+1;for(;u<e.length&&e[u].attention&&e[u].value.charAt(0)===l;)u++;const c=s?e[s-1].value:t,d=cr(c.charCodeAt(c.length-1)),h=cr((u<e.length?e[u].value:n).charCodeAt(0)),p=!h||h===2&&!!d,y=!d||d===2&&!!h,v={tokens:e.slice(s,u),markers:[],start:0,end:0,open:a?p&&(!!d||!y):p,close:a?y&&(!!h||!p):y,split:a!==void 0};for(const w of v.tokens){i.set(w,[...v.tokens]),o.set(w,v);let x=w.value.length;for(;x--;)v.markers.push(w)}v.end=v.markers.length,r.push(v),s=u}for(d_(r,i),s=-1;++s<e.length;){const l=i.get(e[s]);if(l)return{attention:u_(e,l,o),index:s}}}function xs(e,t){const n=e[t?0:e.length-1];if(!n||n.attention)return;const r=t?kl(n.value):hi(n.value),i=tv(r.codePointAt(0));if(t)n.value=i+n.value.slice(r.length);else{let o=n.value.slice(0,n.value.length-r.length),s=0;for(;o.charCodeAt(o.length-1-s)===92;)s++;s%2&&(o+="\\"),n.value=o+i}}function c_(e,t,n,r,i){for(const o of n.attention){const s=t.get(o)||o.sequences[0];for(const l of o.sequences){if(l===s)continue;const a=new Map(t);a.set(o,l);const u=Xl(e,a,r,i),c=rv(u,r,i);if(!c||c.index>n.index)return{chosen:a,mistake:c,tokens:u}}}}function d_(e,t){const n=new Map;for(const r of e){const i=r.tokens[0].value.charAt(0);let o=n.get(i);o||(o=[],n.set(i,o));let s=r.close?o.length:0;for(;s--&&r.start<r.end;){const l=o[s],a=l.end-l.start,u=r.end-r.start;if(r.split?(l.close||r.open)&&u%3&&!((a+u)%3):a!==l.markers.length||a!==u)continue;const c=r.split?a>1&&u>1?2:1:u,d=l.markers.slice(l.end-c,l.end),h=r.markers.slice(r.start,r.start+c),p=d[0],y=h[0];if(p===d[c-1]&&p.value.length===c&&y===h[c-1]&&y.value.length===c&&p.attention===y.attention)t.delete(p),t.delete(y);else{const v=[...new Set([...d,...h])];for(const w of v){const x=t.get(w);x&&x.push(...v)}}l.end-=c,r.start+=c,l.start===l.end&&o.splice(s,1),s=o.length}r.open&&r.start<r.end&&o.push(r)}}function f_(e,t,n){if(t.length===0)throw new Error("Cannot serialize `"+e+"` as attention without markers, expected one or more markers");if(n.length===0)throw new Error("Cannot serialize `"+e+"` as attention without sizes, expected one or more sizes");for(const i of n)if(!Number.isSafeInteger(i)||i<1)throw new Error("Cannot serialize `"+e+"` as attention with `"+i+"` as size, expected positive integer");const r=[];for(const i of t){if(i.length!==1)throw new Error("Cannot serialize `"+e+"` as attention with `"+i+"` as marker, expected a single ascii character");if(!Tx(i.charCodeAt(0)))throw new Error("Cannot serialize `"+e+"` as attention with `"+i+"` as marker, expected ascii punctuation");for(const o of n)r.push(i.repeat(o))}return r}function p_(e,t,n){const r=t.indexStack,i=e.children||[],o=[];let s=-1,l=n.before;r.push(-1);let a=t.createTracker(n);for(;++s<i.length;){const u=i[s];let c;if(r[r.length-1]=s,s+1<i.length){let p=t.handle.handlers[i[s+1].type];p&&p.peek&&(p=p.peek),c=p?kl(p(i[s+1],e,t,{before:"",after:"",...a.current()})):""}else c=n.after;const d=o[o.length-1];typeof d=="string"&&(l==="\r"||l===`
|
|
136
|
+
`)&&u.type==="html"&&a_(u.value)!==7&&(o[o.length-1]=d.replace(/(\r?\n|\r)$/," "),l=" ",a=t.createTracker(n),a.move(Ql(o,n.before,n.after)));const h=t.handle.handlers[u.type];if(h&&h.attention){const p=ef(u,h.attention,t,a);if(!p)continue;o.push(p),l=hi(p.sequences[0])}else{const p=t.handle(u,e,t,{...a.current(),after:c,before:l});if(!p)continue;a.move(p),o.push(p),l=hi(p)}}return r.pop(),o}function ef(e,t,n,r){const{construct:i,markers:o,sizes:s}=t(e,n),l=f_(e.type,o,s),a=l[0],u=n.enter(i),c=n.createTracker(r.current());c.move(a);const d=p_(e,n,{...c.current(),before:a,after:a});if(u(),d.length!==0)return r.move(a),r.move(Ql(d,a,a)),r.move(a),{children:d,sequences:l}}function Wh(e,t,n,r){let i=Xl(e,t,n,r),o=rv(i,n,r);for(;o;){const s=c_(e,t,o,n,r);if(!s)return;t=s.chosen,i=s.tokens,o=s.mistake}return i}function iv(e,t,n,r){let i=n,o=-1;for(;++o<e.length;){const s=e[o];if(typeof s=="string"){i="";continue}const l=o===e.length-1?r:"",a=s.sequences.find(function(u){const c=u.charAt(0);return c!==i.charAt(0)&&c!==l.charAt(0)||e.length===1&&nv.has(c)&&u.length>n.length})||s.sequences[0];a!==s.sequences[0]&&t.set(s,a),iv(s.children,t,a,a),i=a}}function Xl(e,t,n,r){const i=[];let o,s=hi(n),l=-1;for(;++l<e.length;){const a=e[l];if(typeof a=="string"){const g={value:a,attention:void 0};o&&o===kl(a)&&xs([g],!0),o=void 0,i.push(g),g.value&&(s=hi(g.value));continue}const u=t.get(a)||a.sequences[0],c=u.charAt(0),d=e[l+1],h=s,p=kl(d===void 0?r:typeof d=="string"?d:t.get(d)||d.sequences[0]),y=Xl(a.children,t,u,u),v=y[0].value,w=Hh(h.charCodeAt(h.length-1),v.charCodeAt(0),c);w.inside&&xs(y,!0);const x=hi(y[y.length-1].value),m=Hh(p.charCodeAt(0),x.charCodeAt(x.length-1),c);m.inside&&xs(y,!1),w.outside&&h!==`
|
|
137
|
+
`&&h!=="\r"&&xs(i,!1),m.outside&&(o=p),i.push({value:u,attention:a},...y,{value:u,attention:a}),s=u.charAt(u.length-1)}return i}function Ql(e,t,n){const r=new Map;iv(e,r,t,n);const i=(r.size>0?Wh(e,r,t,n):void 0)||Wh(e,new Map,t,n)||Xl(e,new Map,t,n);let o="";for(const s of i)o+=s.value;return o}tf.attention=ov;tf.peek=h_;function tf(e,t,n,r){const i=n.enter("phrasing"),o=ef(e,ov,n,n.createTracker(r)),s=o?Ql([o],r.before,r.after):"";return i(),s}function ov(e,t){return{construct:"emphasis",markers:l_(t)==="*"?["*","_"]:["_","*"],sizes:[1]}}function h_(e,t,n){return n.options.emphasis||"*"}function m_(e,t){let n=!1;return Yl(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,fo}),!!((!e.depth||e.depth<3)&&Wl(e)&&(t.options.setext||n))}function g_(e,t,n,r){const i=Math.max(Math.min(6,e.depth||1),1),o=n.createTracker(r);if(m_(e,n)){const d=n.enter("headingSetext"),h=n.enter("phrasing"),p=n.containerPhrasing(e,{...o.current(),before:`
|
|
138
|
+
`,after:`
|
|
139
|
+
`});return h(),d(),p+`
|
|
140
|
+
`+(i===1?"=":"-").repeat(p.length-(Math.max(p.lastIndexOf("\r"),p.lastIndexOf(`
|
|
141
|
+
`))+1))}const s="#".repeat(i),l=n.enter("headingAtx"),a=n.enter("phrasing");o.move(s+" ");let u=n.containerPhrasing(e,{before:"# ",after:`
|
|
142
|
+
`,...o.current()});const c=u.charCodeAt(0);return(c===9||c===32)&&(u=tv(c)+u.slice(1)),u=u?s+" "+u:s,n.options.closeAtx&&(u+=" "+s),a(),l(),u}sv.peek=y_;function sv(e){return e.value||""}function y_(){return"<"}lv.peek=x_;function lv(e,t,n,r){const i=Jd(n),o=i==='"'?"Quote":"Apostrophe",s=n.enter("image");let l=n.enter("label");const a=n.createTracker(r);let u=a.move("![");return u+=a.move(n.safe(e.alt,{before:u,after:"]",...a.current()})),u+=a.move("]("),l(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(l=n.enter("destinationLiteral"),u+=a.move("<"),u+=a.move(n.safe(e.url,{before:u,after:">",...a.current()})),u+=a.move(">")):(l=n.enter("destinationRaw"),u+=a.move(n.safe(e.url,{before:u,after:e.title?" ":")",...a.current()}))),l(),e.title&&(l=n.enter(`title${o}`),u+=a.move(" "+i),u+=a.move(n.safe(e.title,{before:u,after:i,...a.current()})),u+=a.move(i),l()),u+=a.move(")"),s(),u}function x_(){return"!"}av.peek=v_;function av(e,t,n,r){const i=e.referenceType,o=n.enter("imageReference");let s=n.enter("label");const l=n.createTracker(r);let a=l.move("![");const u=n.safe(e.alt,{before:a,after:"]",...l.current()});a+=l.move(u+"]["),s();const c=n.stack;n.stack=c.filter(function(h){return h!=="phrasing"}),s=n.enter("reference");const d=n.safe(n.associationId(e),{before:a,after:"]",...l.current()});return s(),n.stack=c,o(),i==="full"||!u||u!==d?a+=l.move(d+"]"):i==="shortcut"?a=a.slice(0,-1):a+=l.move("]"),a}function v_(){return"!"}uv.peek=w_;function uv(e,t,n){let r=e.value||"",i="`",o=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^\n\r ]/.test(r)&&(/^[\n\r ]/.test(r)&&/[\n\r ]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++o<n.unsafe.length;){const s=n.unsafe[o],l=n.compilePattern(s);if(!s.atBreak)continue;let a;for(;a=l.exec(r);){let u=a.index;r.charCodeAt(u)===10&&r.charCodeAt(u-1)===13&&u--,r=r.slice(0,u)+" "+r.slice(a.index+1)}}return i+r+i}function w_(){return"`"}function cv(e,t){const n=Wl(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][+\-.a-z]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}dv.peek=k_;function dv(e,t,n,r){const i=Jd(n),o=i==='"'?"Quote":"Apostrophe",s=n.createTracker(r);if(cv(e,n)){const y=n.stack;n.stack=y.filter(function(x){return x!=="phrasing"});const v=n.enter("autolink");let w=s.move("<");return w+=s.move(n.containerPhrasing(e,{before:w,after:">",...s.current()})),w+=s.move(">"),v(),n.stack=y,w}const l=n.enter("link");let a=n.enter("label"),u=s.move("[");const c=n.containerPhrasing(e,{before:u,after:"](",...s.current()});u+=s.move(c),a(),u+=s.move("](");const d=/[\0- \u007F]/.test(e.url),h=r.before.charAt(r.before.length-1);let p=e.title||void 0;if(!p&&!d&&(h===`
|
|
143
|
+
`||h==="\r")){let y=0;for(;y<c.length&&c.charCodeAt(y)!==93;)y+=c.charCodeAt(y)===92?2:1;c.charCodeAt(y+1)===58&&(p="")}return!e.url&&typeof p=="string"||d?(a=n.enter("destinationLiteral"),u+=s.move("<"),u+=s.move(n.safe(e.url,{before:u,after:">",...s.current()})),u+=s.move(">")):(a=n.enter("destinationRaw"),u+=s.move(n.safe(e.url,{before:u,after:typeof p=="string"?" ":")",...s.current()}))),a(),typeof p=="string"&&(a=n.enter(`title${o}`),u+=s.move(" "+i),u+=s.move(n.safe(p,{before:u,after:i,...s.current()})),u+=s.move(i),a()),u+=s.move(")"),l(),u}function k_(e,t,n){return cv(e,n)?"<":"["}fv.peek=b_;function fv(e,t,n,r){const i=e.referenceType,o=n.enter("linkReference");let s=n.enter("label");const l=n.createTracker(r);let a=l.move("[");const u=n.containerPhrasing(e,{before:a,after:"]",...l.current()});a+=l.move(u+"]["),s();const c=n.stack;n.stack=c.filter(function(h){return h!=="phrasing"}),s=n.enter("reference");const d=n.safe(n.associationId(e),{before:a,after:"]",...l.current()});return s(),n.stack=c,o(),i==="full"||!u||u!==d?a+=l.move(d+"]"):i==="shortcut"?a=a.slice(0,-1):a+=l.move("]"),a}function b_(){return"["}function nf(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function E_(e){const t=nf(e),n=e.options.bulletOther;if(!n)return t==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function S_(e){const t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function pv(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function C_(e,t,n,r){const i=n.enter("list"),o=n.bulletCurrent;let s=e.ordered?S_(n):nf(n);const l=e.ordered?s==="."?")":".":E_(n);let a=t&&n.bulletLastUsed?s===n.bulletLastUsed:!1;if(!e.ordered){const c=e.children?e.children[0]:void 0;if((s==="*"||s==="-")&&c&&(!c.children||!c.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(a=!0),pv(n)===s&&c){let d=-1;for(;++d<e.children.length;){const h=e.children[d];if(h&&h.type==="listItem"&&h.children&&h.children[0]&&h.children[0].type==="thematicBreak"){a=!0;break}}}}a&&(s=l),n.bulletCurrent=s;const u=n.containerFlow(e,r);return n.bulletLastUsed=s,n.bulletCurrent=o,i(),u}function N_(e){const t=e.options.listItemIndent||"one";if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function j_(e,t,n,r){const i=N_(n);let o=n.bulletCurrent||nf(n);t&&t.type==="list"&&t.ordered&&(o=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+o);let s=o.length+1;(i==="tab"||i==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(s=Math.ceil(s/4)*4);const l=n.createTracker(r);l.move(o+" ".repeat(s-o.length)),l.shift(s);const a=n.enter("listItem"),u=n.indentLines(n.containerFlow(e,l.current()),c);return a(),u;function c(d,h,p){return h?(p?"":" ".repeat(s))+d:(p?o:o+" ".repeat(s-o.length))+d}}function __(e,t,n,r){const i=n.enter("paragraph"),o=n.enter("phrasing"),s=n.containerPhrasing(e,r);return o(),i(),s}function T_(e,t,n,r){if(!e.children.some(function(l){return Qj(l)}))return n.containerFlow(e,r);const o=n.enter("phrasing"),s=n.containerPhrasing(e,r);return o(),s}function $_(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}rf.attention=hv;rf.peek=I_;function rf(e,t,n,r){const i=n.enter("phrasing"),o=ef(e,hv,n,n.createTracker(r)),s=o?Ql([o],r.before,r.after):"";return i(),s}function hv(e,t){return{construct:"strong",markers:$_(t)==="*"?["*","_"]:["_","*"],sizes:[2]}}function I_(e,t,n){return n.options.strong||"*"}function L_(e,t,n,r){const i=t?t.children:[],o=n.indexStack[n.indexStack.length-1];return n.safe(e.value,{...r,afterNode:i[o+1],beforeNode:i[o-1]})}function A_(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function O_(e,t,n){const r=(pv(n)+(n.options.ruleSpaces?" ":"")).repeat(A_(n));return n.options.ruleSpaces?r.slice(0,-1):r}const Cc={blockquote:Zj,break:Uh,code:i_,definition:s_,emphasis:tf,hardBreak:Uh,heading:g_,html:sv,image:lv,imageReference:av,inlineCode:uv,link:dv,linkReference:fv,list:C_,listItem:j_,paragraph:__,root:T_,strong:rf,text:L_,thematicBreak:O_};function R_(){return{enter:{table:M_,tableData:Vh,tableHeader:Vh,tableRow:F_},exit:{codeText:D_,table:P_,tableData:Za,tableHeader:Za,tableRow:Za}}}function M_(e){const t=e._align;this.enter({type:"table",align:t.map(function(n){return n==="none"?null:n}),children:[],position:void 0},e),this.data.inTable=!0}function P_(e){this.exit(e),this.data.inTable=void 0}function F_(e){this.enter({type:"tableRow",children:[],position:void 0},e)}function Za(e){this.exit(e)}function Vh(e){this.enter({type:"tableCell",children:[],position:void 0},e)}function D_(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,z_));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function z_(e,t){return t==="|"?t:e}function B_(e){const t=e||{},{tableCellPadding:n,tablePipeAlign:r,stringLength:i}=t,o=n?" ":"|";return{handlers:{inlineCode:h,table:s,tableCell:a,tableRow:l},join:[U_],unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
|
|
144
|
+
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}]};function s(p,y,v,w){const x=c(p,v,w),m=x[0];if(m){let g=p.align?p.align.length:0,k=-1;if(!g)for(;++k<x.length;)x[k].length>g&&(g=x[k].length);for(;m.length<g;)m.push("")}return u(x,p.align)}function l(p,y,v,w){const x=d(p,v,w),m=u([x]);return m.slice(0,m.indexOf(`
|
|
145
|
+
`))}function a(p,y,v,w){const x=v.enter("tableCell"),m=v.enter("phrasing"),g=v.containerPhrasing(p,{...w,before:o,after:o});return m(),x(),g}function u(p,y){return Yj(p,{align:y,alignDelimiters:r,fillRows:!1,padding:n,stringLength:i})}function c(p,y,v){const{children:w}=p;let x=-1;const m=[],g=y.enter("table");for(;++x<w.length;)m[x]=d(w[x],y,v);return g(),m}function d(p,y,v){const{children:w}=p;let x=-1;const m=[],g=y.enter("tableRow");for(;++x<w.length;)m[x]=a(w[x],p,y,v);return g(),m}function h(p,y,v){const w=Cc.inlineCode(p,y,v);if(!v.stack.includes("tableCell"))return w;const x=[];let m=0,g=w.indexOf("|");for(;g!==-1;){let k=g;for(;k>m&&w.charCodeAt(k-1)===92;)k--;x.push(w.slice(m,g)),(g-k)%2===0&&x.push("\\"),m=g,g=w.indexOf("|",g+1)}return x.push(w.slice(m)),x.join("")}}function U_(e,t,n,r){if(e.type==="table"&&n.type==="listItem"&&n.spread===!1&&(t.type==="definition"||t.type==="heading"&&H_(t,r)||t.type==="paragraph"||t.type==="table"))return 1}function H_(e,t){let n=!1;return Yl(e,function(r){if(r.type==="break"||"value"in r&&/\r?\n|\r/.test(r.value))return n=!0,fo}),!!((!e.depth||e.depth<3)&&Wl(e)&&(t.options.setext||n))}function W_(){return{exit:{taskListCheckValueChecked:Gh,taskListCheckValueUnchecked:Gh,paragraph:G_}}}function V_(){return{handlers:{paragraph:K_},join:[q_]}}function Gh(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function G_(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const i=t.children;let o=-1,s;for(;++o<i.length;){const l=i[o];if(l.type==="paragraph"){s=l;break}}s===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start={...r.position.start}))}}this.exit(e)}function K_(e,t,n,r){if(!t||t.type!=="listItem"||mv(t)!==e)return Cc.paragraph(e,t,n,r);const i="["+(t.checked?"x":" ")+"] ",o=n.createTracker(r);o.move(i);const s=Cc.paragraph(e.children.length>0?e:{type:"paragraph",children:[{type:"text",value:" "}]},t,n,{...r,...o.current()});return i+s}function q_(e,t,n){if(!(e.type==="definition"&&n.type==="listItem"))return;const r=mv(n);if(r&&n.children.indexOf(e)<n.children.indexOf(r))return 0}function mv(e){if(typeof e.checked=="boolean")for(const t of e.children){if(t.type==="paragraph")return t;if(t.type!=="definition")return}}function Y_(){return[hj(),Fj(),Uj(),R_(),W_()]}function X_(e){return{extensions:[mj(),Dj(e),Hj(),B_(e),V_()]}}const Q_={tokenize:rT,partial:!0},gv={tokenize:iT,partial:!0},yv={tokenize:oT,partial:!0},xv={tokenize:sT,partial:!0},Z_={tokenize:lT,partial:!0},vv={name:"wwwAutolink",tokenize:tT,previous:kv},wv={name:"protocolAutolink",tokenize:nT,previous:bv},Bn={name:"emailAutolink",tokenize:eT,previous:Ev},_n={};function J_(){return{text:_n}}let yr=48;for(;yr<123;)_n[yr]=Bn,yr++,yr===58?yr=65:yr===91&&(yr=97);_n[43]=Bn;_n[45]=Bn;_n[46]=Bn;_n[95]=Bn;_n[72]=[Bn,wv];_n[104]=[Bn,wv];_n[87]=[Bn,vv];_n[119]=[Bn,vv];function eT(e,t,n){const r=this;let i,o;return s;function s(d){return!Nc(d)||!Ev.call(r,r.previous)||of(r.events)?n(d):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),l(d))}function l(d){return Nc(d)?(e.consume(d),l):d===64?(e.consume(d),a):n(d)}function a(d){return d===46?e.check(Z_,c,u)(d):d===45||d===95||ht(d)?(o=!0,e.consume(d),a):c(d)}function u(d){return e.consume(d),i=!0,a}function c(d){return o&&i&&pt(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(d)):n(d)}}function tT(e,t,n){const r=this;return i;function i(s){return s!==87&&s!==119||!kv.call(r,r.previous)||of(r.events)?n(s):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(Q_,e.attempt(gv,e.attempt(yv,o),n),n)(s))}function o(s){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(s)}}function nT(e,t,n){const r=this;let i="",o=!1;return s;function s(d){return(d===72||d===104)&&bv.call(r,r.previous)&&!of(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(d),e.consume(d),l):n(d)}function l(d){if(pt(d)&&i.length<5)return i+=String.fromCodePoint(d),e.consume(d),l;if(d===58){const h=i.toLowerCase();if(h==="http"||h==="https")return e.consume(d),a}return n(d)}function a(d){return d===47?(e.consume(d),o?u:(o=!0,a)):n(d)}function u(d){return d===null||yl(d)||Pe(d)||Fr(d)||Uo(d)?n(d):e.attempt(gv,e.attempt(yv,c),n)(d)}function c(d){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(d)}}function rT(e,t,n){let r=0;return i;function i(s){return(s===87||s===119)&&r<3?(r++,e.consume(s),i):s===46&&r===3?(e.consume(s),o):n(s)}function o(s){return s===null?n(s):t(s)}}function iT(e,t,n){let r,i,o;return s;function s(u){return u===46||u===95?e.check(xv,a,l)(u):u===null||Pe(u)||Fr(u)||u!==45&&Uo(u)?a(u):(o=!0,e.consume(u),s)}function l(u){return u===95?r=!0:(i=r,r=void 0),e.consume(u),s}function a(u){return i||r||!o?n(u):t(u)}}function oT(e,t){let n=0,r=0;return i;function i(s){return s===40?(n++,e.consume(s),i):s===41&&r<n?o(s):s===33||s===34||s===38||s===39||s===41||s===42||s===44||s===46||s===58||s===59||s===60||s===63||s===93||s===95||s===126?e.check(xv,t,o)(s):s===null||Pe(s)||Fr(s)?t(s):(e.consume(s),i)}function o(s){return s===41&&r++,e.consume(s),i}}function sT(e,t,n){return r;function r(l){return l===33||l===34||l===39||l===41||l===42||l===44||l===46||l===58||l===59||l===63||l===95||l===126?(e.consume(l),r):l===38?(e.consume(l),o):l===93?(e.consume(l),i):l===60||l===null||Pe(l)||Fr(l)?t(l):n(l)}function i(l){return l===null||l===40||l===91||Pe(l)||Fr(l)?t(l):r(l)}function o(l){return pt(l)?s(l):n(l)}function s(l){return l===59?(e.consume(l),r):pt(l)?(e.consume(l),s):n(l)}}function lT(e,t,n){return r;function r(o){return e.consume(o),i}function i(o){return ht(o)?n(o):t(o)}}function kv(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||Pe(e)}function bv(e){return!pt(e)}function Ev(e){return!(e===47||Nc(e))}function Nc(e){return e===43||e===45||e===46||e===95||ht(e)}function of(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const aT={tokenize:gT,partial:!0};function uT(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:pT,continuation:{tokenize:hT},exit:mT}},text:{91:{name:"gfmFootnoteCall",tokenize:fT},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:cT,resolveTo:dT}}}}function cT(e,t,n){const r=this;let i=r.events.length;const o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s;for(;i--;){const a=r.events[i][1];if(a.type==="labelImage"){s=a;break}if(a.type==="gfmFootnoteCall"||a.type==="labelLink"||a.type==="label"||a.type==="image"||a.type==="link")break}return l;function l(a){if(!s||!s._balanced)return n(a);const u=gn(r.sliceSerialize({start:s.end,end:r.now()}));return u.codePointAt(0)!==94||!o.includes(u.slice(1))?n(a):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(a),e.exit("gfmFootnoteCallLabelMarker"),t(a))}}function dT(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;const o={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},s={type:"chunkString",contentType:"string",start:Object.assign({},o.start),end:Object.assign({},o.end)},l=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",i,t],["exit",i,t],["enter",o,t],["enter",s,t],["exit",s,t],["exit",o,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...l),e}function fT(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o=0,s;return l;function l(d){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),a}function a(d){return d!==94?n(d):(e.enter("gfmFootnoteCallMarker"),e.consume(d),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",u)}function u(d){if(o>999||d===93&&!s||d===null||d===91||Pe(d))return n(d);if(d===93){e.exit("chunkString");const h=e.exit("gfmFootnoteCallString");return i.includes(gn(r.sliceSerialize(h)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(d)}return Pe(d)||(s=!0),o++,e.consume(d),d===92?c:u}function c(d){return d===91||d===92||d===93?(e.consume(d),o++,u):u(d)}}function pT(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o,s=0,l;return a;function a(y){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(y),e.exit("gfmFootnoteDefinitionLabelMarker"),u}function u(y){return y===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(y),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",c):n(y)}function c(y){if(s>999||y===93&&!l||y===null||y===91||Pe(y))return n(y);if(y===93){e.exit("chunkString");const v=e.exit("gfmFootnoteDefinitionLabelString");return o=gn(r.sliceSerialize(v)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(y),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),h}return Pe(y)||(l=!0),s++,e.consume(y),y===92?d:c}function d(y){return y===91||y===92||y===93?(e.consume(y),s++,c):c(y)}function h(y){return y===58?(e.enter("definitionMarker"),e.consume(y),e.exit("definitionMarker"),i.includes(o)||i.push(o),Ie(e,p,"gfmFootnoteDefinitionWhitespace")):n(y)}function p(y){return t(y)}}function hT(e,t,n){return e.check(Ho,t,e.attempt(aT,t,n))}function mT(e){e.exit("gfmFootnoteDefinition")}function gT(e,t,n){const r=this;return Ie(e,i,"gfmFootnoteDefinitionIndent",5);function i(o){const s=r.events[r.events.length-1];return s&&s[1].type==="gfmFootnoteDefinitionIndent"&&s[2].sliceSerialize(s[1],!0).length===4?t(o):n(o)}}function yT(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:o,resolveAll:i};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(s,l){let a=-1;for(;++a<s.length;)if(s[a][0]==="enter"&&s[a][1].type==="strikethroughSequenceTemporary"&&s[a][1]._close){let u=a;for(;u--;)if(s[u][0]==="exit"&&s[u][1].type==="strikethroughSequenceTemporary"&&s[u][1]._open&&s[a][1].end.offset-s[a][1].start.offset===s[u][1].end.offset-s[u][1].start.offset){s[a][1].type="strikethroughSequence",s[u][1].type="strikethroughSequence";const c={type:"strikethrough",start:Object.assign({},s[u][1].start),end:Object.assign({},s[a][1].end)},d={type:"strikethroughText",start:Object.assign({},s[u][1].end),end:Object.assign({},s[a][1].start)},h=[["enter",c,l],["enter",s[u][1],l],["exit",s[u][1],l],["enter",d,l]],p=l.parser.constructs.insideSpan.null;p&&mn(h,h.length,0,Vl(p,s.slice(u+1,a),l)),mn(h,h.length,0,[["exit",d,l],["enter",s[a][1],l],["exit",s[a][1],l],["exit",c,l]]),mn(s,u-1,a-u+3,h),a=u+h.length-2;break}}for(a=-1;++a<s.length;)s[a][1].type==="strikethroughSequenceTemporary"&&(s[a][1].type="data");return s}function o(s,l,a){const u=this.previous,c=this.events;let d=0;return h;function h(y){return u===126&&c[c.length-1][1].type!=="characterEscape"?a(y):(s.enter("strikethroughSequenceTemporary"),p(y))}function p(y){const v=cr(u);if(y===126)return d>1?a(y):(s.consume(y),d++,p);if(d<2&&!n)return a(y);const w=s.exit("strikethroughSequenceTemporary"),x=cr(y);return w._open=!x||x===2&&!!v,w._close=!v||v===2&&!!x,l(y)}}}class xT{constructor(){this.map=[],this.index=new Map}add(t,n,r){vT(this,t,n,r)}consume(t){if(this.map.sort(function(o,s){return o[0]-s[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push(t.slice()),t.length=0;let i=r.pop();for(;i;){for(const o of i)t.push(o);i=r.pop()}this.map.length=0,this.index.clear()}}function vT(e,t,n,r){if(n===0&&r.length===0)return;const i=e.index.get(t);if(i){i[1]+=n,i[2].push(...r);return}const o=[t,n,r];e.map.push(o),e.index.set(t,o)}function wT(e,t){let n=!1;const r=[];for(;t<e.length;){const i=e[t];if(n){if(i[0]==="enter")i[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(i[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const o=r.length-1;r[o]=r[o]==="left"?"center":"right"}}else if(i[1].type==="tableDelimiterRow")break}else i[0]==="enter"&&i[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function kT(){return{flow:{null:{name:"table",tokenize:bT,resolveAll:ET}}}}function bT(e,t,n){const r=this;let i=0,o=0,s;return l;function l(b){let R=r.events.length-1;for(;R>-1;){const{type:I}=r.events[R][1];if(I==="lineEnding"||I==="linePrefix")R--;else break}const $=R>-1?r.events[R][1].type:null,P=$==="tableHead"||$==="tableRow"?E:a;return P===E&&r.parser.lazy[r.now().line]?n(b):P(b)}function a(b){return e.enter("tableHead"),e.enter("tableRow"),u(b)}function u(b){return b===124||(s=!0,o+=1),c(b)}function c(b){return b===null?n(b):xe(b)?o>1?(o=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(b),e.exit("lineEnding"),p):n(b):be(b)?Ie(e,c,"whitespace")(b):(o+=1,s&&(s=!1,i+=1),b===124?(e.enter("tableCellDivider"),e.consume(b),e.exit("tableCellDivider"),s=!0,c):(e.enter("data"),d(b)))}function d(b){return b===null||b===124||Pe(b)?(e.exit("data"),c(b)):(e.consume(b),b===92?h:d)}function h(b){return b===92||b===124?(e.consume(b),d):d(b)}function p(b){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(b):(e.enter("tableDelimiterRow"),s=!1,be(b)?Ie(e,y,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(b):y(b))}function y(b){return b===45||b===58?w(b):b===124?(s=!0,e.enter("tableCellDivider"),e.consume(b),e.exit("tableCellDivider"),v):C(b)}function v(b){return be(b)?Ie(e,w,"whitespace")(b):w(b)}function w(b){return b===58?(o+=1,s=!0,e.enter("tableDelimiterMarker"),e.consume(b),e.exit("tableDelimiterMarker"),x):b===45?(o+=1,x(b)):b===null||xe(b)?k(b):C(b)}function x(b){return b===45?(e.enter("tableDelimiterFiller"),m(b)):C(b)}function m(b){return b===45?(e.consume(b),m):b===58?(s=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(b),e.exit("tableDelimiterMarker"),g):(e.exit("tableDelimiterFiller"),g(b))}function g(b){return be(b)?Ie(e,k,"whitespace")(b):k(b)}function k(b){return b===124?y(b):b===null||xe(b)?!s||i!==o?C(b):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(b)):C(b)}function C(b){return n(b)}function E(b){return e.enter("tableRow"),A(b)}function A(b){return b===124?(e.enter("tableCellDivider"),e.consume(b),e.exit("tableCellDivider"),A):b===null||xe(b)?(e.exit("tableRow"),t(b)):be(b)?Ie(e,A,"whitespace")(b):(e.enter("data"),T(b))}function T(b){return b===null||b===124||Pe(b)?(e.exit("data"),A(b)):(e.consume(b),b===92?L:T)}function L(b){return b===92||b===124?(e.consume(b),T):T(b)}}function ET(e,t){let n=-1,r=!0,i=0,o=[0,0,0,0],s=[0,0,0,0],l=!1,a=0,u,c,d;const h=new xT;for(;++n<e.length;){const p=e[n],y=p[1];p[0]==="enter"?y.type==="tableHead"?(l=!1,a!==0&&(Kh(h,t,a,u,c),c=void 0,a=0),u={type:"table",start:Object.assign({},y.start),end:Object.assign({},y.end)},h.add(n,0,[["enter",u,t]])):y.type==="tableRow"||y.type==="tableDelimiterRow"?(r=!0,d=void 0,o=[0,0,0,0],s=[0,n+1,0,0],l&&(l=!1,c={type:"tableBody",start:Object.assign({},y.start),end:Object.assign({},y.end)},h.add(n,0,[["enter",c,t]])),i=y.type==="tableDelimiterRow"?2:c?3:1):i&&(y.type==="data"||y.type==="tableDelimiterMarker"||y.type==="tableDelimiterFiller")?(r=!1,s[2]===0&&(o[1]!==0&&(s[0]=s[1],d=vs(h,t,o,i,void 0,d),o=[0,0,0,0]),s[2]=n)):y.type==="tableCellDivider"&&(r?r=!1:(o[1]!==0&&(s[0]=s[1],d=vs(h,t,o,i,void 0,d)),o=s,s=[o[1],n,0,0])):y.type==="tableHead"?(l=!0,a=n):y.type==="tableRow"||y.type==="tableDelimiterRow"?(a=n,o[1]!==0?(s[0]=s[1],d=vs(h,t,o,i,n,d)):s[1]!==0&&(d=vs(h,t,s,i,n,d)),i=0):i&&(y.type==="data"||y.type==="tableDelimiterMarker"||y.type==="tableDelimiterFiller")&&(s[3]=n)}for(a!==0&&Kh(h,t,a,u,c),h.consume(t.events),n=-1;++n<t.events.length;){const p=t.events[n];p[0]==="enter"&&p[1].type==="table"&&(p[1]._align=wT(t.events,n))}return e}function vs(e,t,n,r,i,o){const s=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",l="tableContent";n[0]!==0&&(o.end=Object.assign({},Gr(t.events,n[0])),e.add(n[0],0,[["exit",o,t]]));const a=Gr(t.events,n[1]);if(o={type:s,start:Object.assign({},a),end:Object.assign({},a)},e.add(n[1],0,[["enter",o,t]]),n[2]!==0){const u=Gr(t.events,n[2]),c=Gr(t.events,n[3]),d={type:l,start:Object.assign({},u),end:Object.assign({},c)};if(e.add(n[2],0,[["enter",d,t]]),r!==2){const h=t.events[n[2]],p=t.events[n[3]];if(h[1].end=Object.assign({},p[1].end),h[1].type="chunkText",h[1].contentType="text",n[3]>n[2]+1){const y=n[2]+1,v=n[3]-n[2]-1;e.add(y,v,[])}}e.add(n[3]+1,0,[["exit",d,t]])}return i!==void 0&&(o.end=Object.assign({},Gr(t.events,i)),e.add(i,0,[["exit",o,t]]),o=void 0),o}function Kh(e,t,n,r,i){const o=[],s=Gr(t.events,n);i&&(i.end=Object.assign({},s),o.push(["exit",i,t])),r.end=Object.assign({},s),o.push(["exit",r,t]),e.add(n+1,0,o)}function Gr(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const ST={name:"tasklistCheck",tokenize:NT};function CT(){return{text:{91:ST}}}function NT(e,t,n){const r=this;return i;function i(a){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(a):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(a),e.exit("taskListCheckMarker"),o)}function o(a){return Pe(a)?(e.enter("taskListCheckValueUnchecked"),e.consume(a),e.exit("taskListCheckValueUnchecked"),s):a===88||a===120?(e.enter("taskListCheckValueChecked"),e.consume(a),e.exit("taskListCheckValueChecked"),s):n(a)}function s(a){return a===93?(e.enter("taskListCheckMarker"),e.consume(a),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),l):n(a)}function l(a){return xe(a)?t(a):be(a)?e.check({tokenize:jT},t,n)(a):n(a)}}function jT(e,t,n){return Ie(e,r,"whitespace");function r(i){return i===null?n(i):t(i)}}function _T(e){return jx([J_(),uT(),yT(e),kT(),CT()])}const TT={};function $T(e){const t=this,n=e||TT,r=t.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),o=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),s=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(_T(n)),o.push(Y_()),s.push(X_(n))}function IT({file:e,split:t,version:n}){const r=e.status==="added"?["new"]:e.status==="removed"?["old"]:t?["old","new"]:["new"];return f.jsx("div",{className:`fs-md-sides n${r.length}`,children:r.map(i=>f.jsx(LT,{side:i,path:i==="old"?e.oldPath??e.path:e.path,diffPath:e.path,version:n,labelled:r.length>1},i))})}function LT({side:e,path:t,diffPath:n,version:r,labelled:i}){const[o,s]=U.useState(null),[l,a]=U.useState(null);U.useEffect(()=>{let c=!0;return a(null),Jy(n,e).then(d=>c&&s(d.join(`
|
|
146
|
+
`)),d=>c&&a(d instanceof Error?d.message:String(d))),()=>{c=!1}},[n,e,r]);const u={a:({href:c,children:d})=>c&&/^(https?:|mailto:)/i.test(c)?f.jsx("a",{href:c,target:"_blank",rel:"noreferrer noopener",children:d}):f.jsx("span",{className:"fs-md-link",title:c,children:d}),code:({className:c,children:d})=>{var v;const h=(v=/language-([\w+-]+)/.exec(c??""))==null?void 0:v[1],p=String(d??"").replace(/\n$/,""),y=h?H1(p,h):void 0;return y?f.jsx("code",{className:c,children:y.map((w,x)=>f.jsxs("span",{children:[w.map((m,g)=>m.types?f.jsx("span",{className:`token ${m.types}`,children:m.text},g):m.text),x<y.length-1&&`
|
|
147
|
+
`]},x))}):f.jsx("code",{className:c,children:d})}};return f.jsxs("div",{className:`fs-md-side ${e}`,children:[i&&f.jsx("div",{className:`fs-image-side ${e}`,children:e==="old"?"変更前":"変更後"}),l?f.jsxs("div",{className:"ds-muted",children:["読み込めませんでした: ",l]}):o===null?f.jsx("div",{className:"ds-muted",children:"読み込み中…"}):f.jsx("div",{className:"fs-md",children:f.jsx(oj,{remarkPlugins:[$T],components:u,urlTransform:(c,d)=>AT(c,d,t,e,r),children:o})})]})}function AT(e,t,n,r,i){if(t!=="src"||/^[a-z][a-z0-9+.-]*:/i.test(e)||e.startsWith("//"))return Zx(e);const o=OT(n,e.replace(/[?#].*$/,""));return o?ex(o,r,i):""}function OT(e,t){let n=t;try{n=decodeURIComponent(t)}catch{}const r=n.startsWith("/")?[]:e.split("/").slice(0,-1);for(const i of n.split("/"))if(!(i===""||i==="."))if(i===".."){if(!r.length)return null;r.pop()}else r.push(i);return r.length?r.join("/"):null}const RT={added:"A",modified:"M",removed:"D",renamed:"R"},MT={added:"追加",modified:"変更",removed:"削除",renamed:"名前の変更"},Sv=1500;function Cv(e){if(lc(e.path))return{label:"画像",first:e.binary?"preview":"diff"};if(x1(e.path)&&!e.binary&&!e.large)return{label:"プレビュー",first:"diff"}}const PT=U.memo(function(t){const{file:n}=t,r=U.useRef(null),i=zT(r,t.scrollRoot),[o,s]=U.useState(!1),l=lx(n),a=Cv(n),u=a?t.view:"diff",c=U.useMemo(()=>k1(n,t.content,t.expansion),[n,t.content,t.expansion]),d=U.useMemo(()=>i?U1(n,t.content):void 0,[n,t.content,i]);U.useEffect(()=>(t.register(n.path,r.current),()=>t.register(n.path,null)),[n.path,t.register]);const h=async()=>{await Do(n.path),s(!0),window.setTimeout(()=>s(!1),1400)},p=!!n.unchanged,y=p?DT(n):FT(n),v=()=>u==="preview"?i?lc(n.path)?f.jsx(W1,{file:n,version:t.version}):f.jsx(IT,{file:n,split:t.mode==="split",version:t.version}):f.jsx("div",{className:"fs-placeholder",style:{height:240}}):y?f.jsx("div",{className:"fs-note",children:y}):i?f.jsx(F1,{file:n,mode:p?"unified":t.mode,rows:c,tokens:d,byLine:t.byLine,onExpand:(w,x)=>t.onExpand(n.path,w,x)}):f.jsx("div",{className:"fs-placeholder",style:{height:(l+n.chunks.length)*20}});return f.jsxs("section",{ref:r,className:`fs-file${t.reviewed?" reviewed":""}${p?" unchanged":""}`,"data-path":n.path,children:[f.jsxs("header",{className:"fs-file-head",children:[f.jsx("button",{className:`fs-fold${t.open?" open":""}`,onClick:()=>t.onToggle(n.path),"aria-label":t.open?"折りたたむ":"開く","aria-expanded":t.open,children:f.jsx(py,{size:14})}),p?f.jsx("span",{className:"fs-st unchanged",title:"変更なし"}):f.jsx("span",{className:`fs-st ${n.status}`,title:MT[n.status],children:RT[n.status]}),f.jsxs("span",{className:"fs-file-path",title:n.oldPath?`${n.oldPath} → ${n.path}`:n.path,onClick:()=>t.onToggle(n.path),children:[n.oldPath&&f.jsxs(f.Fragment,{children:[f.jsx("span",{className:"fs-old-path",children:n.oldPath}),f.jsx("span",{className:"ds-muted",children:" → "})]}),n.path]}),f.jsx("button",{className:"fs-icon-btn",onClick:()=>void h(),title:o?"コピーしました":"パスをコピー","aria-label":"パスをコピー",children:f.jsx(fy,{size:13})}),n.generated&&f.jsx("span",{className:"fs-tag",title:"ロックファイルや生成されたコード(最初は折りたたんでいます)",children:"生成"}),p&&f.jsx("span",{className:"fs-tag",title:"ツリーの「全体」から開いた、変更していないファイル",children:"変更なし"}),f.jsx("span",{className:"ds-spacer"}),a&&!(lc(n.path)&&n.binary)&&f.jsx("span",{className:"ds-seg fs-view-seg",role:"radiogroup","aria-label":"表示",children:[["diff","差分"],["preview",a.label]].map(([w,x])=>f.jsx("button",{role:"radio","aria-checked":u===w,className:u===w?"on":"",onClick:()=>t.onView(n.path,w),children:x},w))}),t.commentCount>0&&f.jsx(Io,{n:t.commentCount,title:`コメント ${t.commentCount}`}),p?t.onClose&&f.jsx("button",{className:"ds-btn",onClick:()=>t.onClose(n.path),title:"一覧から外す(ツリーの「全体」からまた開けます)",children:"閉じる"}):f.jsxs(f.Fragment,{children:[f.jsx(Ti,{stats:{added:n.additions,removed:n.deletions},title:`追加 ${n.additions} 行・削除 ${n.deletions} 行`}),f.jsxs("label",{className:"ds-check fs-viewed",title:"確認済みにすると折りたたみます(このファイルがまた変わると外れます)",children:[f.jsx("input",{type:"checkbox",checked:t.reviewed,onChange:w=>t.onReviewed(n.path,w.target.checked)}),"確認済み"]})]})]}),t.open&&f.jsxs("div",{className:"fs-file-body",children:[t.orphans.length>0&&f.jsxs("div",{className:"fs-orphans",children:[f.jsx("div",{className:"ds-muted",children:"差分からなくなった行へのコメント"}),t.orphans.map(w=>f.jsx(Pd,{c:w,showWhere:!0},w.id))]}),v()]}),!t.open&&(n.generated||l>Sv)&&!t.reviewed&&f.jsxs("div",{className:"fs-folded",children:[n.generated?"生成されたファイルのため折りたたんでいます":`大きな差分(${l} 行)のため折りたたんでいます`,f.jsx("button",{className:"ds-link",onClick:()=>t.onToggle(n.path),children:"表示する"})]})]})});function FT(e){if(e.binary)return"バイナリファイルのため、行の差分はありません";if(e.large)return"大きすぎるため、行の差分を表示していません";if(!(e.chunks.length>0))return e.modeChange?`ファイルのモードだけが変わりました(${e.modeChange})`:e.status==="renamed"?"名前だけが変わりました(内容の変更はありません)":"空のファイルです"}function DT(e){return e.loading?"読み込み中…":e.binary?"バイナリファイルです":e.large?"大きすぎるため、内容を表示していません":e.chunks.length===0?"空のファイルです":void 0}function zT(e,t){const[n,r]=U.useState(!1);return U.useEffect(()=>{const i=e.current;if(n||!i||!t)return;const o=new IntersectionObserver(s=>{s.some(l=>l.isIntersecting)&&r(!0)},{root:t,rootMargin:"1200px 0px"});return o.observe(i),()=>o.disconnect()},[e,t,n]),n}const BT={added:"A",modified:"M",removed:"D",renamed:"R"},qh=(e,t)=>{const n=new Set(e);return n.has(t)?n.delete(t):n.add(t),n};function UT({mode:e,onMode:t,tree:n,error:r,current:i,reviewed:o,commentCounts:s,onSelect:l,onReviewed:a}){var E,A;const[u,c]=U.useState(""),d=e==="all",[h,p]=U.useState(new Set),[y,v]=U.useState(null),w=U.useMemo(()=>d&&n?v1(n):null,[d,n]);U.useEffect(()=>{w&&y===null&&v(w)},[w,y]);const x=U.useMemo(()=>n?ox(n,u):null,[n,u]),m=U.useMemo(()=>n&&!d?ix(n):[],[n,d]),g=T=>{var L;return u.trim()!==""||(d?((L=y??w)==null?void 0:L.has(T))===!0:!h.has(T))},k=T=>d?v(L=>qh(L??w??new Set,T)):p(L=>qh(L,T)),C=(T,L)=>{var $;const b={paddingLeft:8+L*12};if(T.plain||($=T.file)!=null&&$.unchanged)return f.jsxs("div",{className:`fs-tree-row file plain${i===T.path?" current":""}${T.file?" shown":""}`,style:b,onClick:()=>l(T.path),title:`${T.path}(変更なし)`,children:[f.jsx("span",{className:"fs-tree-check-space"}),f.jsx("span",{className:"fs-st small unchanged"}),f.jsx("span",{className:"fs-tree-name",children:T.name}),(s.get(T.path)??0)>0&&f.jsx(Io,{n:s.get(T.path)})]},T.path);if(T.file){const P=T.file,I=s.get(P.path)??0,z=o.has(P.path);return f.jsxs("div",{className:`fs-tree-row file${i===P.path?" current":""}${z?" reviewed":""}`,style:b,onClick:()=>l(P.path),title:P.oldPath?`${P.oldPath} → ${P.path}`:P.path,children:[f.jsx("input",{type:"checkbox",className:"fs-tree-check",checked:z,onClick:B=>B.stopPropagation(),onChange:B=>a(P.path,B.target.checked),"aria-label":`${P.path} を確認済みにする`,title:"確認済み"}),f.jsx("span",{className:`fs-st small ${P.status}`,children:BT[P.status]}),f.jsx("span",{className:"fs-tree-name",children:T.name}),I>0&&f.jsx(Io,{n:I}),f.jsxs("span",{className:"fs-tree-counts",children:[P.additions>0&&f.jsxs("span",{className:"added",children:["+",P.additions]}),P.deletions>0&&f.jsxs("span",{className:"removed",children:["−",P.deletions]})]})]},T.path)}const R=g(T.path);return f.jsxs("div",{children:[f.jsxs("div",{className:`fs-tree-row dir${d&&w&&!w.has(T.path)?" plain":""}`,style:b,onClick:()=>k(T.path),title:T.path,children:[f.jsx("span",{className:`fs-fold small${R?" open":""}`,children:f.jsx(py,{size:12})}),f.jsx("span",{className:"fs-tree-name",children:T.name})]}),R&&T.children.map(P=>C(P,L+1))]},T.path)};return f.jsxs("aside",{className:"fs-tree",children:[f.jsxs("div",{className:"fs-tree-head",children:[f.jsx("div",{className:"ds-seg fs-tree-mode",role:"radiogroup","aria-label":"ツリーに出すファイル",children:[["changes","変更","変更したファイルだけ"],["all","全体","リポジトリのすべてのファイル(変更していないファイルはクリックで開きます)"]].map(([T,L,b])=>f.jsx("button",{role:"radio","aria-checked":e===T,className:e===T?"on":"",onClick:()=>t(T),title:b,children:L},T))}),d?f.jsx("button",{className:"fs-icon-btn",disabled:!w,onClick:()=>{var T;return v((T=y??w)!=null&&T.size?new Set:w)},title:(E=y??w)!=null&&E.size?"すべてのフォルダを閉じる":"変更のあるフォルダを開く",children:(A=y??w)!=null&&A.size?"−":"+"}):m.length>0&&f.jsx("button",{className:"fs-icon-btn",onClick:()=>p(h.size?new Set:new Set(m)),title:h.size?"すべてのフォルダを開く":"すべてのフォルダを閉じる",children:h.size?"+":"−"}),f.jsx("input",{className:"fs-filter",type:"search",placeholder:"ファイルを絞り込む",value:u,onChange:T=>c(T.target.value)})]}),f.jsx("div",{className:"fs-tree-body",children:r?f.jsxs("div",{className:"fs-tree-empty ds-muted",children:["リポジトリのファイルを読めませんでした: ",r]}):x?x.children.length>0?x.children.map(T=>C(T,0)):f.jsx("div",{className:"fs-tree-empty ds-muted",children:u?"一致するファイルはありません":d?"ファイルはありません":"変更されたファイルはありません"}):f.jsx("div",{className:"fs-tree-empty ds-muted",children:"読み込み中…"})})]})}const Nv="fileshape.reviewed:",HT=e=>`${e.repoRoot}|${e.targetLabel}|${e.baseLabel}`,Yh=e=>jn(Nv+e,{}),WT=(e,t)=>hn(Nv+e,t),VT=e=>new Map(e.map(t=>[t.path,j1(t)]));function GT(e,t){const n=new Set;for(const[r,i]of e)t[r]===i&&n.add(r);return n}const Ja="fileshape.treeWidth",eu=280,KT={};function qT({data:e,active:t,onComments:n,request:r}){var jt;const i=HT(e),[o,s]=U.useState(()=>A1(i)),l=`fileshape.opened:${i}`,[a,u]=U.useState(()=>YT(jn(l,[])));U.useEffect(()=>hn(l,a),[l,a]);const[c,d]=U.useState(new Map),h=U.useRef(new Set),p=U.useMemo(()=>new Set(e.files.map(Q=>Q.path)),[e]),y=U.useMemo(()=>[...new Set([...a,...o.filter(Q=>Q.unchanged).map(Q=>Q.path)])].filter(Q=>!p.has(Q)),[a,o,p]);U.useEffect(()=>{for(const Q of y){if(c.has(Q)||h.current.has(Q))continue;const ie=h.current;ie.add(Q);const ye=Ee=>{h.current===ie&&(ie.delete(Q),d(je=>new Map(je).set(Q,Ee)))};g1(Q).then(Ee=>ye(Ee?Hp(Q,Ee):null),()=>ye(null))}},[y,c]),U.useEffect(()=>{a.some(Q=>c.get(Q)===null)&&u(Q=>Q.filter(ie=>c.get(ie)!==null))},[c,a]);const v=U.useMemo(()=>y.filter(Q=>c.get(Q)!==null).map(Q=>c.get(Q)??Hp(Q,void 0)),[y,c]),w=U.useMemo(()=>v.length?{...e,files:[...e.files,...v]}:e,[e,v]),x=U.useMemo(()=>new Set(o.map(Q=>Q.path)),[o]),m=U.useCallback(Q=>u(ie=>ie.filter(ye=>ye!==Q)),[]),g=U.useMemo(()=>Up(w.files),[w]),k=U.useMemo(()=>rx(g),[g]),[C,E]=U.useState(()=>Xu("fileshape","treeMode","changes")),A=Q=>{E(Q),Qu("fileshape","treeMode",Q)},[T,L]=U.useState(null);U.useEffect(()=>{if(C!=="all"||(T==null?void 0:T.diff)===e)return;let Q=!0;return m1().then(ie=>Q&&L({diff:e,paths:ie}),ie=>Q&&L({diff:e,error:ie instanceof Error?ie.message:String(ie)})),()=>{Q=!1}},[C,e,T]);const b=(T==null?void 0:T.diff)===e?T.paths:void 0,R=U.useMemo(()=>C==="changes"?g:b?Up(w.files,b):null,[C,g,w,b]),[$,P]=U.useState(()=>Xu("fileshape","mode","unified")),I=Q=>{P(Q),Qu("fileshape","mode",Q)},[z,B]=U.useState(()=>Yh(i));U.useEffect(()=>B(Yh(i)),[i]);const W=U.useMemo(()=>VT(e.files),[e]),M=U.useMemo(()=>GT(W,z),[W,z]),[K,S]=U.useState({}),X=Q=>{if(Q in K)return K[Q];const ie=dn(w,Q);return!ie||!(M.has(Q)||ie.generated||lx(ie)>Sv)},Z=U.useRef(X);Z.current=X;const _=U.useCallback(Q=>S(ie=>({...ie,[Q]:!Z.current(Q)})),[]),[O,N]=U.useState(new Map),[F,G]=U.useState({}),[Y,ee]=U.useState(0),D=U.useRef(new Map),te=U.useRef(!0);U.useEffect(()=>{if(te.current){te.current=!1;return}D.current=new Map,N(new Map),G({}),ee(Q=>Q+1),h.current=new Set,d(new Map)},[e]);const ae=U.useCallback(Q=>{let ie=D.current.get(Q);if(!ie){const ye=D.current;ie=Jy(Q,"new").then(Ee=>(D.current===ye&&N(je=>new Map(je).set(Q,Ee)),Ee)),ie.catch(()=>ye.delete(Q)),ye.set(Q,ie)}return ie},[]),Fe=U.useCallback(async(Q,ie,ye)=>{const Ee=dn(w,Q);if(!Ee)return;let je;try{je=await ae(Q)}catch(re){window.alert(`ファイルを読めませんでした: ${re instanceof Error?re.message:String(re)}`);return}const j=Ul(Ee,je.length)[ie.index];j&&G(re=>({...re,[Q]:b1(re[Q]??{},j,ye,je.length)}))},[w,ae]),[Ce,_e]=U.useState({}),ot=U.useCallback((Q,ie)=>_e(ye=>({...ye,[Q]:ie})),[]),V=U.useRef(new Map),ne=U.useCallback((Q,ie)=>{ie?V.current.set(Q,ie):V.current.delete(Q)},[]),[oe,he]=U.useState(null),me=U.useCallback((Q,ie)=>{const ye=W.get(Q);if(ye&&(B(Ee=>{const je={...Ee};return ie?je[Q]=ye:delete je[Q],WT(i,je),je}),S(Ee=>({...Ee,[Q]:!ie})),ie)){const Ee=V.current.get(Q),je=oe;Ee&&je&&Ee.getBoundingClientRect().top<je.getBoundingClientRect().top&&Ee.scrollIntoView({block:"start"})}},[W,i,oe]),[de,Te]=U.useState(null),[nt,Xe]=U.useState(null),q=U.useCallback(Q=>{s(Q),O1(i,Q)},[i]),H=U.useMemo(()=>({run:w,comments:o,contents:O,composing:de,editing:nt,compose:Q=>{Te(Q),Xe(null)},edit:Q=>{Xe(Q),Te(null)},add:(Q,ie)=>{var ye;q([...o,I1(Q,ie,!!((ye=dn(w,Q.path))!=null&&ye.unchanged))]),Te(null)},update:(Q,ie)=>{q(o.map(ye=>ye.id===Q?{...ye,body:ie}:ye)),Xe(null)},remove:Q=>q(o.filter(ie=>ie.id!==Q))}),[w,o,O,de,nt,q]),J=U.useMemo(()=>{const Q=new Map,ie=[];for(const ye of o){const Ee=dn(w,ye.path);if(!Ee){ie.push(ye);continue}let je=Q.get(ye.path);je||Q.set(ye.path,je={byLine:new Map,orphans:[]});const j=Lo(Ee,ye,O.get(ye.path));if(j.line===void 0)je.orphans.push(ye);else{const re=Vr(ye.side,j.endLine??j.line);je.byLine.set(re,[...je.byLine.get(re)??[],ye])}}return{byFile:Q,gone:ie}},[o,w,O]);U.useEffect(()=>{for(const Q of o){const ie=dn(w,Q.path);ie&&!qp(ie,Q)&&!O.has(Q.path)&&ae(Q.path).catch(()=>{})}G(Q=>{let ie=Q;for(const ye of o){const Ee=dn(w,ye.path),je=O.get(ye.path);if(!Ee||!je||qp(Ee,ye))continue;const j=Lo(Ee,ye,je);if(j.line===void 0)continue;const re=j.endLine??j.line,[pe,ge]=ye.side==="new"?[j.line,re]:[ac(Ee,j.line)??j.line,ac(Ee,re)??re],Qe=E1(Ee,je.length,ie[ye.path]??{},pe,ge);Qe!==(ie[ye.path]??{})&&JSON.stringify(Qe)!==JSON.stringify(ie[ye.path]??{})&&(ie={...ie,[ye.path]:Qe})}return ie})},[o,O,w,ae]);const ce=U.useMemo(()=>({byLine:new Map,orphans:[]}),[]),ue=U.useMemo(()=>{const Q=new Map;for(const ie of o)Q.set(ie.path,(Q.get(ie.path)??0)+1);return Q},[o]);U.useEffect(()=>{const Q=o.filter(ie=>$1(w,ie,O.get(ie.path))!=="resolved").length;n({open:Q,prompt:()=>ux(w,o,{header:!1,contents:O}).text})},[o,w,O,n]);const[ve,we]=U.useState(((jt=k[0])==null?void 0:jt.path)??null);U.useEffect(()=>{if(!oe)return;let Q=0;const ie=()=>{cancelAnimationFrame(Q),Q=requestAnimationFrame(()=>{var je;const ye=oe.getBoundingClientRect().top+8;let Ee=((je=k[0])==null?void 0:je.path)??null;for(const j of k){const re=V.current.get(j.path);if(re)if(re.getBoundingClientRect().top<=ye)Ee=j.path;else break}we(Ee)})};return oe.addEventListener("scroll",ie,{passive:!0}),()=>{oe.removeEventListener("scroll",ie),cancelAnimationFrame(Q)}},[oe,k]);const Ne=U.useRef(null),Re=Q=>{var pe;X(Q)||S(ge=>({...ge,[Q]:!0})),we(Q),(pe=Ne.current)==null||pe.stop();const ie=oe;if(!ie)return;let ye=0,Ee=0;const je=performance.now(),j=()=>{cancelAnimationFrame(ye),ie.removeEventListener("wheel",j),ie.removeEventListener("touchmove",j),ie.removeEventListener("keydown",j),Ne.current=null},re=()=>{const ge=V.current.get(Q);if(ge){const Qe=ge.getBoundingClientRect().top-ie.getBoundingClientRect().top-(parseFloat(getComputedStyle(ie).paddingTop)||0),_t=ie.scrollTop+ie.clientHeight>=ie.scrollHeight-1;Math.abs(Qe)>1&&!(_t&&Qe>0)?(ie.scrollTop+=Qe,Ee=0):Ee++}if(Ee>10||performance.now()-je>1500)return j();ye=requestAnimationFrame(re)};ie.addEventListener("wheel",j,{passive:!0}),ie.addEventListener("touchmove",j,{passive:!0}),ie.addEventListener("keydown",j),Ne.current={stop:j},ye=requestAnimationFrame(re)};U.useEffect(()=>()=>{var Q;return(Q=Ne.current)==null?void 0:Q.stop()},[]);const Ke=Q=>{w.files.some(ie=>ie.path===Q)||u(ie=>ie.includes(Q)?ie:[...ie,Q]),Re(Q)},Ue=U.useRef(0);U.useEffect(()=>{if(!r||!t||!oe||r.seq===Ue.current)return;Ue.current=r.seq;const Q=k.find(ie=>ie.path===r.target)??k.find(ie=>ie.oldPath===r.target);Ke(Q?Q.path:r.target)});const[Nt,kt]=U.useState(()=>jn(Ja,eu)),ct=U.useRef(null),st=_1(e.files),Mt=T1(e.files);return f.jsx(dx.Provider,{value:H,children:f.jsxs("div",{className:"fs-app",ref:ct,style:{gridTemplateColumns:`${Nt}px ${Mr}px minmax(0, 1fr)`},"data-active":t||void 0,children:[f.jsxs(Nd,{children:[f.jsxs(jd,{children:[f.jsx(bi,{children:"ファイル"}),f.jsx(Dl,{stats:st,unit:"ファイル",showZero:!0}),f.jsx(_d,{}),f.jsx(bi,{children:"行"}),f.jsx(Ti,{stats:Mt,title:`追加 ${Mt.added} 行・削除 ${Mt.removed} 行`,showZero:!0})]}),f.jsx(Td,{}),f.jsx($d,{done:M.size,total:W.size,title:"確認済みにしたファイル(そのファイルがまた変わると外れます)"}),f.jsx("div",{className:"ds-seg",role:"radiogroup","aria-label":"表示",children:[["unified","Unified"],["split","Split"]].map(([Q,ie])=>f.jsx("button",{role:"radio","aria-checked":$===Q,className:$===Q?"on":"",onClick:()=>I(Q),children:ie},Q))})]}),f.jsx(UT,{mode:C,onMode:A,tree:R,error:C==="all"&&(T==null?void 0:T.diff)===e?T.error??null:null,current:ve,reviewed:M,commentCounts:ue,onSelect:Ke,onReviewed:me}),f.jsx($o,{title:"ドラッグで幅を変更(ダブルクリックで戻す)",start:()=>Nt,onDrag:(Q,ie)=>{var ye;return kt(Math.max(160,Math.min(Q+ie,(((ye=ct.current)==null?void 0:ye.clientWidth)??1200)-320)))},onEnd:()=>hn(Ja,Nt),onReset:()=>{kt(eu),hn(Ja,eu)}}),f.jsxs("main",{className:"fs-main",ref:he,children:[J.gone.length>0&&f.jsxs("div",{className:"fs-orphans top",children:[f.jsx("div",{className:"ds-muted",children:"差分からなくなったファイルへのコメント"}),J.gone.map(Q=>f.jsx(Pd,{c:Q,showWhere:!0},Q.id))]}),k.length===0&&f.jsx("div",{className:"fs-empty",children:"変更されたファイルはありません"}),k.map(Q=>{var ye;const ie=J.byFile.get(Q.path)??ce;return f.jsx(PT,{file:Q,mode:$,open:X(Q.path),reviewed:M.has(Q.path),content:O.get(Q.path),expansion:F[Q.path]??KT,view:Ce[Q.path]??((ye=Cv(Q))==null?void 0:ye.first)??"diff",version:Y,byLine:ie.byLine,orphans:ie.orphans,commentCount:ue.get(Q.path)??0,scrollRoot:oe,onToggle:_,onReviewed:me,onExpand:Fe,onView:ot,register:ne,onClose:Q.unchanged&&!x.has(Q.path)?m:void 0},Q.path)})]})]})})}const YT=e=>Array.isArray(e)?e.filter(t=>typeof t=="string"):[],XT={id:"file",title:"ファイル",description:"ファイルの差分(fileshape): 変更された各ファイルの行の差分",icon:kd,View:qT,badge:e=>e.files.length||void 0},QT=[XT,h1,kb];async function Xh(e){const t=await fetch(e);if(!t.ok)throw new Error(await t.text());return await t.json()}function tu(){const e=window.location.hash.replace(/^#\/?/,""),t=e.indexOf("/");if(t<0)return{module:e,target:null};let n;try{n=decodeURIComponent(e.slice(t+1))}catch{n=e.slice(t+1)}return{module:e.slice(0,t),target:n||null}}const ZT=(e,t)=>`${e}/${t.split("/").map(encodeURIComponent).join("/")}`;function JT(){const[e,t]=U.useState(null),[n,r]=U.useState(null),[i,o]=U.useState({}),[s,l]=U.useState(!1),[a,u]=U.useState(()=>tu().module),[c,d]=U.useState(()=>{const I=tu();return I.target?{[I.module]:{target:I.target,seq:1}}:{}}),[h,p]=U.useState({}),[y,v]=U.useState(null),w=U.useMemo(()=>e?QT.filter(I=>e.modules.includes(I.id)):[],[e]),x=U.useCallback(async I=>{try{const z=await Xh(`/api/info${I?"?refresh=1":""}`);t(z),r(null),o(B=>Object.fromEntries(z.modules.map(W=>{var M;return[W,((M=B[W])==null?void 0:M.state)==="ready"?B[W]:{state:"loading"}]}))),await Promise.all(z.modules.map(async B=>{let W;try{const M=await Xh(`/api/module/${B}`);W="error"in M?{state:"error",error:M.error}:{state:"ready",data:M.data}}catch(M){W={state:"error",error:M instanceof Error?M.message:String(M)}}o(M=>({...M,[B]:W}))}))}catch(z){r(z instanceof Error?z.message:String(z))}},[]);U.useEffect(()=>{x(!1)},[x]);const m=U.useCallback(()=>{const I=tu();if(u(I.module),I.target){const z=I.target;d(B=>{var W;return{...B,[I.module]:{target:z,seq:(((W=B[I.module])==null?void 0:W.seq)??0)+1}}})}},[]);U.useEffect(()=>(window.addEventListener("hashchange",m),()=>window.removeEventListener("hashchange",m)),[m]);const g=w.find(I=>I.id===a)??w[0],k=I=>{window.location.hash=I,u(I)},C=U.useCallback((I,z)=>{const B=ZT(I,z);window.location.hash.replace(/^#\/?/,"")===B?m():window.location.hash=B},[m]),E=U.useMemo(()=>w.map(I=>I.id),[w]),A=U.useRef(new Map),T=I=>{let z=A.current.get(I);return z||A.current.set(I,z=B=>p(W=>({...W,[I]:B}))),z},L=async()=>{l(!0),await x(!0),l(!1)},b=I=>{v(I),window.setTimeout(()=>v(z=>z===I?null:z),2500)},R=w.filter(I=>{var z;return(((z=h[I.id])==null?void 0:z.open)??0)>0}),$=R.reduce((I,z)=>I+h[z.id].open,0),P=async()=>{if(!e||$===0)return;const I=R.map(z=>[`## ${z.description}`,"",h[z.id].prompt().trimEnd()].join(`
|
|
148
|
+
`));await Do([...Fl(e),"",...I.flatMap(z=>[z,""])].join(`
|
|
149
|
+
`).trimEnd()+`
|
|
150
|
+
`),b(`${$} 件をコピーしました`)};return n?f.jsxs("div",{className:"shell-message",children:["読み込めませんでした: ",n]}):!e||!g?f.jsx("div",{className:"shell-message shell-muted",children:"解析中…"}):f.jsxs("div",{className:`shell ${w.length>1?"with-rail":""}`,children:[w.length>1&&f.jsx("nav",{className:"rail","aria-label":"モジュール",children:w.map(I=>{var z;return f.jsx(e$,{module:I,loaded:i[I.id],active:I===g,comments:((z=h[I.id])==null?void 0:z.open)??0,onClick:()=>k(I.id)},I.id)})}),f.jsxs("header",{className:"shell-head",children:[f.jsx("span",{className:"shell-brand",children:"diffshape"}),w.length===1&&f.jsx("span",{className:"shell-module",children:g.title}),f.jsxs("span",{className:"shell-compare",title:`${e.repoRoot}
|
|
151
|
+
${e.baseLabel} → ${e.targetLabel}`,children:[f.jsx("span",{className:"ds-ref",children:e.baseLabel}),f.jsx("span",{className:"shell-muted",children:"→"}),f.jsx("span",{className:"ds-ref",children:e.targetLabel})]}),f.jsx("span",{className:"shell-spacer"}),y&&f.jsx("span",{className:"shell-note",children:y}),f.jsxs("button",{className:"ds-btn ds-btn-note",onClick:()=>void P(),disabled:$===0,title:$?`未対応のコメント(${R.map(I=>`${I.title} ${h[I.id].open}`).join("、")})を AI 用のプロンプトとしてコピー`:"未対応のコメントはありません",children:[f.jsx(fy,{size:13}),"AI 用にコピー",$>0?`(${$})`:""]}),f.jsxs("button",{className:"ds-btn",onClick:()=>void L(),disabled:s,title:"リポジトリを読み直して比較し直す",children:[f.jsx(r0,{size:13,className:s?"shell-spin":void 0}),s?"解析中…":"再読み込み"]})]}),f.jsx("main",{className:"shell-body",children:w.map(I=>{const z=i[I.id]??{state:"loading"},B=I===g;return f.jsxs("section",{className:"shell-module-root","data-module":I.id,hidden:!B,children:[z.state==="loading"&&f.jsx("div",{className:"shell-message shell-muted",children:"解析中…"}),z.state==="error"&&f.jsxs("div",{className:"shell-message",children:[f.jsx("p",{children:I.description}),f.jsx("p",{className:"shell-error",children:z.error})]}),z.state==="ready"&&f.jsx(I.View,{data:z.data,active:B,onComments:T(I.id),modules:E,openIn:C,request:c[I.id]??null},`${e.targetLabel}|${e.baseLabel}`)]},I.id)})})]})}function e$({module:e,loaded:t,active:n,comments:r,onClick:i}){var l;const o=(t==null?void 0:t.state)==="ready"?(l=e.badge)==null?void 0:l.call(e,t.data):void 0,s=e.icon;return f.jsxs("button",{className:`rail-btn ${n?"on":""} ${(t==null?void 0:t.state)==="error"?"unavailable":""}`,onClick:i,title:`${e.description}${o?`
|
|
152
|
+
変更 ${o}`:""}${r?`
|
|
153
|
+
未対応のコメント ${r}`:""}`,"aria-label":e.title,"aria-current":n?"page":void 0,children:[f.jsx(s,{size:20}),f.jsx("span",{className:"rail-label",children:e.title}),o!==void 0&&f.jsx("span",{className:"rail-badge",children:o>99?"99+":o}),r>0&&f.jsx("span",{className:"rail-dot"})]})}cy(document.getElementById("root")).render(f.jsx(U.StrictMode,{children:f.jsx(JT,{})}));
|